> On Aug 18, 2014, at 10:00 AM, Sebastien ARBOGAST > <[email protected]> wrote: > > How can I do that when I track the changes feed on the sync gateway using > something like Ektorp for example? Is there a proper way to get the previous > revision of a document so that I can compare it with the current one and see > that an endDate field has been added?
First you need to get the revision history by issuing "GET /db/docid?revs=true". The response will include a "_revs" property that's a list of revision IDs; the second one will be the parent revision. Then "GET /db/docid?rev=parent" where parent is the parent revision ID. In the future we may add a callback to the sync function that lets it trigger external web-hooks; then you could code your sync function to call a hook when the endDate field was added. —Jens -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/313DADC7-6563-40E2-97B0-A6A573D7DB48%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
