Twitfave exposes some of the information it gathers from twitter and also adds some extra scoring information that it creates. This page documents the API to gain access to that information.
Wherever possible, the API attempts to be "RESTful". At the moment, only a JSON output is available. Should there be enough demand for other formats, I may consider adding them.
All feature requests, bugs found, etc should be reported via get satisfaction. If you wish to be kept up to date with changes to twitfave, including API changes, you should follow @twitfave on twitter
Currently, there are no usage limits on the service. However, if in the future API usage causes excess load on our servers, we may employ them. Should this be required, the service will return a 503 Service Unavailable error, with a Retry-After header indicating the number of seconds you should wait before attempting to ask questions of the API again. Your client should be equipped to deal with this.
Because twitfave spiders the twitter API in order to find information about tweets that have been favourited, it often takes a long time to find out about a particular favourite. You shouldn't consider twitfave to provide timely information on all users, as it prioritises the spidering of high scoring individuals and users who follow the twitfave user. Sometimes, this means that a low scoring individuals favourites may not be seen for weeks after the event.
Twitfave makes no attempt to store users tweets if the user is marked as private on twitter. If you attempt to query a private user, a user without tweets or a 404 may be returned.
In order to use the data from these JSON calls within javascript from external sites, a callback parameter has been added. Adding ?callback=function_name will wrap the data in a callback function. You can see some examples of using services like this on the Yahoo development network here.
http://twitfave.com/<username>/status/<tweet_id>.json
In order to get information about a single tweet, you should use the URL pattern listed above. It should be noted that this is the url used to access a single tweet in twitfave itself, just with the extension .json added.
You should expect output similar to the following (which has had whitespace added for clarity):
[
{
"pk": 5941564,
"model": "faves.tweet",
"fields":
{
"language": "en",
"author": 33423,
"text": "On the one hand,
vegetarianism is healthy and humane. On the other hand,
bacon.",
"created_at": "2007-01-01 00:00:00",
"source": "<a href=\"http://iconfactory.com/software/twitterrific\">twitterrific</a>",
"in_reply_to_status_id": null,
"score": "296.5080",
"in_reply_to_user_id": null,
"faved_by":
[
3796,
4902,
10343,
12098,
53993,
607653,
749863,
803479,
861201,
2487031,
2788841,
5761072,
7404012,
8446602,
8453632
],
"hotness": "296.5080",
"found_at": "2008-11-23 09:24:49"
}
}
]
This has had several fields added from the original twitter api data.
http://twitfave.com/<username>.json
In order to get information about the tweets of a user which have been favourited by other users, use the URL pattern listed above. It should be noted that this is the url used to access a users favourited tweets in twitfave itself, just with the extension .json added.
You should expect similar output to the single tweet method, except multiple tweets in the array. For some users, this file will be quite large - you should cache the result and call this method infrequently for each user. Should this prove popular, additions to this method are planned which will enable you to receive differences only or to only receive the file if there are changes (this will use If-Modified-Since headers, should you wish to plan for it.)
If there is reasonable interest in the API or using the API in ways that aren't currently possible, I'm open to adding and expanding methods. My current ideas are:
If you'd like either of these to happen, or have other ideas, please use get satisfaction. If you wish to be kept up to date with changes to twitfave, including API changes, you should follow @twitfave on twitter.