Basic APIs
Comments XML
Comments can be retrieved primarily in the following 2 URL formats:
- http://api.sharedcopy.com/public/users/USER_LOGIN.xml refers to fetching comments from USER_LOGIN
- http://api.sharedcopy.com/public/tags/TAG/comments.xml refers to fetching comments from any user and tagged with TAG
These URLs does not require any authentication, and returns public comments from the requested scope.
To request for private comments, developers simply have to insert HTTP BASIC Authentication credentials into the request HTTP headers and the XML returned will automatically be populated with public and private comments.
Scoping
To narrow down the scope, requests can be appended with more /TAG path segments to indicate an AND condition,
- http://api.sharedcopy.com/public/users/USER_LOGIN/TAG1/TAG2.xml refers to fetching comments from USER_LOGIN and are tagged with TAG1 and TAG2
- http://api.sharedcopy.com/public/tags/TAG/TAG1/TAG2/comments.xml refers to fetching comments from any user and are tagged with TAG and TAG1 and TAG2.
Paging
Comments are ordered reverse-chronologically, hence older comments will not be listed in the XML returned. To fetch the next set of older comments, simply add a ?page=N HTTP parameter. For example:
- http://api.sharedcopy.com/public/users/USER_LOGIN.xml?page=2
- http://api.sharedcopy.com/public/tags/TAG/comments.xml?page=15
Questions or Problems?
For more information, please consult the mailing list or reach us directly using the Contact Us form.
