Synchronization

Synchronize Bookmarks

If the user is logged in, and you have a valid cookie for the session to send with requests: (All of these require authentication through sending a cookie for a valid logged-in session to GiveALink with the request.)

Downloading the donation

To download the user's bookmarks/triples:

Request http://givealink.org/api/download_donation to get the triples (pairs, since the user is constant) formatted like:
<bookmarks>
<pages>
<page title=[title] url=[url] />
<page title=[title] url=[url] />
</pages>
<pagetags>
<pair url=[url] tag=[tag] />
<pair url=[url] tag=[tag] />
</pagetags>
</bookmarks>

Posts/bookmarks

To send a new or updated post (set of triples for one <user,url> pair):

Request http://givealink.org/api/update_post?url=[url]&title=[title]&tags=[space-separated list of tags]
Returns XML indicating success or failure/error.

To delete a post/bookmark:

Request http://givealink.org/api/delete_post?url=[url]
Returns XML indicating success or failure/error.

Tags

To make a subtag (add <user,url,tag> triples for all urls where there is a <user,url,subtag> triple for a given user):

Request http://givealink.org/api/add_tag?tag=[tag]&subtag=[subtag]
Returns XML indicating success or failure/error.

To change a tag (turn <user,url,old_tag> triples into <user,url,new_tag> triples for all urls for a given user):

Request http://givealink.org/api/add_tag?tag=[tag]&subtag=[subtag]
Returns XML indicating success or failure/error.

To delete a tag (remove all triples for the user that contain the submitted tag):

Request http://givealink.org/api/delete_tag?tag=[tag]
Returns XML indicating success or failure/error.