3 ms·
It's not really a syncing protocol - a syncing protocol is something more like FeedSync (formally SSE)[1]. This looks more like an API for a feed reader type a
by nl 13y ago
It's not really a syncing protocol - a syncing protocol is something more like FeedSync (formally SSE)[1].
This looks more like an API for a feed reader type application. From a quick read it looks mostly ok for that (although I'd question why...)
Out of interest, why not implement a read-only version of rfc5023/AtomPub[2]?
Anyway...
I'd suggest you get rid of the "Article" Object, and use the Atom "Entry" object instead (or possibly a single-entry Atom feed if you are in XML mode), serialized as JSON
The "Fetch" call should probably take a "since date" as an option, instead of just "since id". It should return a JSON serialized Atom feed, not a custom object.
https://cwiki.apache.org/confluence/display/ABDERA/JSON+Serialization https://cwiki.apache.org/confluence/display/ABDERA/JSON+Seri... is a pretty decent JSON serialization spec for Atom
Notable omissions: no concept of tagging or saving articles.
[1] https://en.wikipedia.org/wiki/FeedSync https://en.wikipedia.org/wiki/FeedSync
[2] http://bitworking.org/projects/atom/rfc5023.html http://bitworking.org/projects/atom/rfc5023.html
- ArturoVM 13y agoThank you for your feedback (and the links). Changing "Article" to "Entry"—noted. As for doing away with the custom schema and using the Atom serialization you posted: it's worth noting the protocol is meant to sync with Atom _and_ RSS transparently; to keep things simple and consistent, a middle ground has to be found. `since_date` is something I'm working on.
- nl 13y agoAtom is a superset of RSS (to be more precise, it's a superset of all the different RSS dialects, properly specified).
- ArturoVM 13y agoTrue. But there are certain elements that vary greatly between specs (or rather, between spec and... suggested format?). For example, the `person` construct, the `text` construct, etc, which are rather inconsistent and flat in the RSS spec. If it were all fire–and–forget, I could rest at ease knowing it's a superset, but most differences are not additive.