ljr/livejournal/doc/raw/int/protocol/syncitems.mode.xml

43 lines
2.6 KiB
XML
Executable File

<method name="syncitems">
<shortdes>
Returns a list of all the items that have been created or updated for a user.
</shortdes>
<des>
Returns a list (or part of a list) of all the items (journal entries, to-do items, comments) that have been created or updated on LiveJournal since you last downloaded them. Note that the items themselves are not returned --- only the item type and the item number. After you get this you have to go fetch the items using another protocol mode. For journal entries (type "L"), use the getevents mode with a selecttype of "syncitems".
</des>
<arguments><struct count="1">
&authInfo;
<key name="lastsync" count="opt"><scalar><des>
The date you last downloaded synced, in "yyyy-mm-dd hh:mm:ss" format. <emphasis>Note</emphasis>: do not make this date up from the client's local computer... send the date from this mode's response of the newest item you have saved on disk.
</des></scalar></key>
</struct></arguments>
<!--===================[ RETURN ]==============================-->
<returns><struct count="1">
<key name="syncitems" count="1"><list count="1"><struct count="0more">
<key name="item" count="1"><scalar><des>
The nth item, in the form "Type-Number". Type can be one of "L" for log entries (journal entries), "C" for comments (not implemented), "T" for to-do items (not implemented), or many other things presumably. If your client doesn't know how to fetch an item of a certain type, just ignore them. A new version of your client could later see that it has never downloaded anything of type "T" and go back and fetch everything of that type from the beginning.
</des></scalar></key>
<key name="action" count="1"><scalar><des>
Either "create" or "update". This field isn't too useful, but you may want to make your client verbose and tell the user what it's doing. For example, "Downloading entry 5 of 17: Updated".
</des></scalar></key>
<key name="time" count="1"><scalar><des>
The server time (in the form "yyyy-mm-dd hh:mm:ss") that this creation or update took place. Remember in your local store the most recent for each item type ("L", "T", "C", etc...). This is what you send in subsequent requests in lastsync.
</des></scalar></key>
</struct></list></key>
<key name="count" count="1"><scalar><des>
The number of items that are contained in this response (numbered started at 1). If sync_count is equal to sync_total, then you can stop your sync after you complete fetching every item in this response.
</des></scalar></key>
<key name="total" count="1"><scalar><des>
The total number of items that have been updated since the time specified.
</des></scalar></key>
</struct></returns>
</method>