Is it possible to check for 'published' element in a deleted entry?

2 views
Skip to first unread message

Savago

unread,
Jan 20, 2009, 1:51:11 PM1/20/09
to Google Contacts API
Friends

AFAICT, when retrieving an entry which was deleted, it will not
feature the 'published' element tag.

There are some synchronization problems that would benefit from this
data, because using it together with 'updated' element can help to
detect if the deleted entry was available during the last sync
operation (assuming here that I stored the timestamp of most recently
updated entry when I first did a sync and that I will use this
timestamp when querying by updated changes).

Anyone known if there is a way to known this data from a deleted
entry? Case negative, are there plans to support it?


Best regards


Adenilson

Julian (Google)

unread,
Jan 21, 2009, 12:29:08 PM1/21/09
to Google Contacts API
Hi Adenilson,

It is possible to use Etags to store information of deleted/updated
entries from previous synchronizations, this is only available in V2.

http://code.google.com/apis/contacts/docs/2.0/reference.html

http://code.google.com/apis/contacts/docs/2.0/migration_guide.html

Cheers,
Julian.

Savago

unread,
Jan 23, 2009, 5:48:56 PM1/23/09
to Google Contacts API
Dear Julian

Thanks for answering my message.

I have finished reading the references about ETags and also ported
libgcal to new Google API Protocol 2.0.
http://repo.or.cz/w/libgcal.git

As I understood, ETags will only be useful to make optional edit/
delete of entries (being calendar events or contacts) when they were
updated in server. And also to query by a unique entry.

But this *doesn't* cover the case that I explained in my first
message, which basically is about detecting if a deleted entry was
present when I last did a synchronization with my google list of
contacts.

I could maintain a table of IDs to solve this, but using this formula
would be way more efficient (suggestion by a fellow hacker):
"If published > last_sync and deleted > last_sync then ignore"

I do query by changes using the timestamp of last-updated entry, to
make possible do fast-sync (instead of dumping all contacts over-and-
over-again).

I'm trying to make this work with opensync, further details can be
found here:
http://opensync.org/ticket/1051


Do you have any suggestion?


Best regards


Adenilson

Julian (Google)

unread,
Jan 26, 2009, 5:40:05 AM1/26/09
to Google Contacts API
Hi Adenilson,

Unfortunately, there is not a way to store/read information about your
last synchronization using the API, I think you can only do it by
maintaining the table of IDs like you mentioned.

Cheers,
Julian.

On Jan 23, 10:48 pm, Savago <cavalcan...@gmail.com> wrote:
> Dear Julian
>
> Thanks for answering my message.
>
> I have finished reading the references about ETags and also ported
> libgcal to new Google API Protocol 2.0.http://repo.or.cz/w/libgcal.git
Reply all
Reply to author
Forward
0 new messages