Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


Top White Papers

More on LinuxToday


From Social to Serious: Combining Twitter and RESTful Web Services

Mar 31, 2009, 10:03 (0 Talkback[s])
(Other stories by Kurt Cagle)

"Social applications aside, Twitter is also ideal for performing all kinds of useful programmatic projects, from invoking web services to creating link-lists to performing semantic analysis. This becomes especially powerful when combined with something like an XML database that can perform periodic queries of content and retrieve only relevant pieces of information.

"This article walks through the creation of a RESTful data application around an XML database, which will demonstrate how to use the Twitter API and how to make such an API work using virtual collections. This simple web application will periodically query the Twitter API for new status messages from a chosen user's account and download them to the database as XML, combining the XML and Atom formats to give access to both. Twitter API and RESTful Interfaces

"The Twitter API is remarkably simple to use, and it contains a number of goodies for XML and JSON developers. The API allows access to most of the primary feeds that Twitter provides, including the general Twitter stream, an authenticated user's personal and friends' streams, replies, personal messages, and system-level status messages. For the most part, these are RESTful interfaces. In essence, each URL is a collection of Twitter status messages (known colloquially as tweets). You use HTTP GET operations to receive a listing of tweets relevant to the particular collection feed, POST operations to add a new tweet to the appropriate collection, and DELETE to remove a tweet from a collection. These are good examples of "virtual collections." The tweet universe is in fact just a single table of tweets with these different views representing different "filterings" of that single list."

Complete Story

Related Stories: