mozilla-services / syncto

Sync to Kinto bridge (read and write data from/to sync with the Kinto interface)
https://wiki.mozilla.org/Firefox_OS/Syncto
6 stars 6 forks source link

Add support for `info/collections` #71

Open michielbdejong opened 8 years ago

michielbdejong commented 8 years ago

SyncClient exposes various methods including info_collections, get_records and get_record. Of these, Syncto only exposes get_records (from here) and get_record (from here).

It turns out that although meta/global lives on /storage/meta/global and can be fetched using either get_records(meta) or get_record(meta, global), info/collections lives outside /storage, directly on /info/collections, and therefore we cannot access it via Syncto.

Natim commented 8 years ago

What do you need from info/collections ? Is this related to: https://github.com/mozilla-services/syncto/issues/51 ?

michielbdejong commented 8 years ago

It's because of https://github.com/mozilla-services/docs/blob/368cc63d1e01583abef022ee5fc9b630c53eb102/source/sync/lifeofasync.rst#fetch-infocollections. See also https://github.com/mozilla-services/docs/issues/55

michielbdejong commented 8 years ago

I'm not so sure if we really need this though, or we can do without.

michielbdejong commented 8 years ago

It was for https://bugzilla.mozilla.org/show_bug.cgi?id=1204830#c0 but I guess it's just a 'nice to have' that can save some roundtrips if people sync 2 or more collections that don't change often.

Natim commented 8 years ago

Yes we can probably add an utility endpoint to provide this information if you need it.