Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
After the previous recipe in which you were able to create desktop notifications, you probably have some ideas of how you might use the Notification API. The ability to notify the user of an event when they are not in the browser window is quite useful.
In this recipe, you will use the Notification API to display on the desktop notifications of new tweets from a particular Twitter.com user. The recipe will use the Twitter API statuses/user_timeline to retrieve new tweets by the user and then display the tweets as notifications on the desktop. The page will check for new tweets by the user repeatedly with a 60-second span between requests to Twitter.com. The first time the request is made, the page will by default grab the three most recent tweets to display. For more information on the Twitter API, see the documentation for the REST API at http://dev.twitter.com/doc and the specific API method the recipe will use at http://dev.twitter.com/doc/get/statuses/user_timeline.