Wednesday 1 October 2008

Tweet-SQL: Working with public_timeline xml



Tweet-SQL allows you to use the Twitter API with TSQL.

Tweet-SQL includes the ability to work with resultsets in various ways; Relational Resultsets, a single columned XML result, or through OUTPUT parameters. These can be easily switched through using the Tweet-SQL Configuration Program or the supplied configuration stored procedures.

Relational Resultsets

This first example works from the following Tweet-SQL configuration...

d9e7c582-8ff0-11dd-9154-8a5bc84f091e.png

Calling the public timeline is easy...

e3bc4884-8e6b-11dd-8741-8a5bc84f091e.png

Don't like the first resultset appearing? No problem...

f763af22-8ff0-11dd-9154-8a5bc84f091e.png

Fire up the Tweet-SQL Configuration program and change the "No Type Array" combo box as above, File > Save Config. Alternatively you could use the tweet_cfg_no_type_array stored procedure to achieve the same result. Now the first resultset will be omitted.

7bdf50ca-8e6c-11dd-8741-8a5bc84f091e.png

XML Resultsets

Maybe you would prefer to return the public timeline in a resultset as raw xml? In the Tweet-SQL Configuration program change the "Result Type" Combo Box as below. File > Save Config.

1bf8a798-8ff1-11dd-9154-8a5bc84f091e.png

Now the following will be returned...

13f587c6-8e6d-11dd-8741-8a5bc84f091e.png

Click on the xml to view the entire document...

1.png

OUTPUT Parameters

OUTPUT parameters are always available for use but, If you prefer, you can work exclusively with OUTPUT parameters by changing the "Result Type" combo box to "No ResultSets".

375b4e28-8ff1-11dd-9154-8a5bc84f091e.png

The below screen-shot shows a simple of example of working with Tweet-SQL in this way.

353ccefc-8e6e-11dd-8741-8a5bc84f091e.png

Blogged with the Flock Browser

No comments: