All pastes #2100423 Raw Edit

Mine

public text v1 · immutable
#2100423 ·published 2012-01-06 14:16 UTC
rendered paste body
Tweet Density (beta)
Given a twitter user handle, find the tweet density of the corresponding user. Write a web service, tweetdensity, which returns the number of tweets published every hour. (a tweet published exactly at 2:00 pm is part of 2-3 pm, not 1-2 pm) For examples, please check http://xefer.com/twitter/interviewstreet and http://tweetstats.com/status/interviewstreet.
 
The webservice takes the following parameter
type: string can be {"html", "xml", "json"}
handle: string (eg: 'interviewstreet', 'twitter')
count: integer X (number of tweets to analyze)
Sample input request:
http://<EC2-INSTANCE-URL>/tweetdensity/?handle=interviewstreet&count=500&type=xml
http://<EC2-INSTANCE-URL>/tweetdensity/?handle=interviewstreet&count=50&type=json
http://<EC2-INSTANCE-URL>/tweetdensity/?handle=interviewstreet&count=250&type=html
 
Sample output response:
http://linode.interviewstreet.com/tasks/4890/response1.xml
http://linode.interviewstreet.com/tasks/4890/response1.json
http://linode.interviewstreet.com/tasks/4890/response1.html
(ok, so the last link is actually a screenshot, but yours should be html)
PS: You can use any api to create the charts (eg, google charts, high charts etc)
 
Test Instructions
Please write your code on your local machine. Then, when you're ready to test and submit, click the Participate button below and enter your public key to check out an instance for 1 hour and load your code via SSH.
After one hour, we will automatically shut down your instance, load it onto our instance, and hit it with the URL's of our secret set of tweets. You can assume that no new tweets will be added to the account for the active duration of this problem.

Scoring
Json and xml will be tested for each test case. There will be no automatic html queries, but if this was a part of the real CodeSprint, the html query of the hardest test case is what would be presented to the recruiter for this question.