Attention API
Info
This lets users retrieve and update their![[WWW]](https://cdn.statically.io/img/web.archive.org/web/20060114004706im_/http://developers.technorati.com/content/rightsidebar/img/moin-www.png)
Format
The call is made using a REST-ful interface. Send either a HTTP GET or a HTTP POST to
http://api.technorati.com/attention/?user=<username>&passhash=<hash>
with mandatory parameters "user" and "passhash" and additional optional parameters described below.
Parameters
-
user (mandatory) - The user name
Sign up here.
-
passhash (mandatory) - MD5 hash of the user password, hex encoded.
-
If it is a POST, a file parameter indicates the attention.xml file to be uploaded and merged
-
(NB currently this just replaces the existing one. This will change)
-
Currently, the POSTed file is not validated - this will also change
Response
-
For a GET or successful POST, the response will be the up-to-date attention.xml file
-
for a failed one the result with be a suitable http error with some explanatory text in html.
Suggestions
-
There should be a "since" parameter (ISO8601) which on GET would only retrieve the attention changes *since* a certain datetime (e.g. feeds with changed properties or new posts, or any feeds with posts with changed properties), and then allow the client to merge that into it's local copy of attention.xml.
-
In the spirit of REST, the If-Modified-Since header could be used in the request for this purpose. The absence of this parameter would mean the entire attention.xml file is being requested.
-
On POST the client would simply send only the feeds/posts with changed properties (e.g. user read a post), and the attention sync/storage server would merge those in.
-
Actually, on POST, such a param is unnecessary, the client can simply send the changed subset of attention.xml, and the sync/storage server will assimilate it properly anyway by design!