Sign up Login
home | you | technology | web 2.0 | podcasts | entertainment | photos | comics | videos
 
Latest from lemonad
 

Twitter Feeds support http if-modified-since

Monday, March 12, 2007

When looking at the twitter feeds today I noticed that they support http if-modified-since. Type in the following in your shell:

$ curl -z "20070312 00:00:00 CET"
http://twitter.com/statuses/user_timeline/663633.rss

and it returns:





http://twitter.com/lemonad
Twitter updates from lemonad
en-us
40


lemonad: This is a message
Mon, 12 Mar 2007 05:11:34 +0000
http://twitter.com/lemonad/statuses/6883771
http://twitter.com/lemonad/statuses/6883771



lemonad: This is another message
Mon, 12 Mar 2007 00:15:46 +0000
http://twitter.com/lemonad/statuses/6806561
http://twitter.com/lemonad/statuses/6806561



but if you instead type:

$ curl -z "20070312 02:00:00 CET"
http://twitter.com/statuses/user_timeline/663633.rss

you will get the following result:





http://twitter.com/lemonad
Twitter updates from lemonad
en-us
40


lemonad: This is a message
Mon, 12 Mar 2007 05:11:34 +0000
http://twitter.com/lemonad/statuses/6883771
http://twitter.com/lemonad/statuses/6883771



Unfortunately, it doesn’t seem like there’s any way of getting back more than 20 items, no matter what date and time is used.

20070313: Add ?count=n to the end of the feed url where n is the number of entries you want. This way you can get a lot more than 20 entries.

20070318: From the Twitter Development Talk group:

Wow, Jonas, you found that recent addition before we even documented it! You totally get a gold star :)

Alex Payne
Obvious
http://twitter.com/al3x

By the way, if you haven’t already got SXSW- and twitter-induced ADD or you’re willing to live with it, then by all means feel free to add me!

...
Original article from http://jonasnockert.com/2007/03/twitter_feeds_support_lastmodi/
Login to read full articles and enjoy our free features for members.
« Movable Type 3, MySQL and UTF-8
links for 2007-03-14 »
 

Related articles