Skip to content

Instantly share code, notes, and snippets.

@gerardpaapu
Created April 19, 2010 21:08
Show Gist options
  • Save gerardpaapu/371633 to your computer and use it in GitHub Desktop.
Save gerardpaapu/371633 to your computer and use it in GitHub Desktop.
Basic Usage
-----------
Twitter.View is a class that monitors any number of twitter timelines.
The option 'feeds' can take a string or an array of strings.
It understands a shorthand for users "@user", lists "@user/list", and everything else becomes a search.
This example will follow the user "sharkbrain", a list he owns called "my-friends" and search for any posts directed to him.
var sharkView = new Twitter.View({'feeds': ['@sharkbrain', '@sharkbrain/my-friends', 'to:sharkbrain']});
`View`s, `Timeline`s and `Tweet`s all implement `toElement`, and therefore can be `grab`bed, `adopt`ed and `$`ed.
$('TwitterContainer').empty().grab(sharkView);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment