Difference between revisions of "C4LN 2012: Intro to the Twitter API"
From Code4Lib
Shadowspar (Talk | contribs) |
Shadowspar (Talk | contribs) |
||
Line 3: | Line 3: | ||
== API Overview == | == API Overview == | ||
− | * https://dev.twitter.com/ is API central. | + | * https://dev.twitter.com/ is API central. |
− | * https://dev.twitter.com/docs | + | ** other useful things linked therefrom: [https://dev.twitter.com/status API Status], [https://dev.twitter.com/issues API Known Issues], blog & discussion |
+ | * https://dev.twitter.com/docs is the main documentation area | ||
+ | ** you'll find yourself spending a lot of time here =) | ||
Line 10: | Line 12: | ||
The twitter API breaks down into three main areas | The twitter API breaks down into three main areas | ||
− | * the REST API | + | * the '''REST API''' |
− | * the Streaming API | + | ** query→response based access |
− | * the Search API | + | ** this is what you're most likely to use |
+ | * the '''Streaming API''' | ||
+ | ** aka ''drinking from the firehose'' =) | ||
+ | ** push-based communication w/ v.high ratelimit | ||
+ | * the '''Search API''' | ||
+ | ** just like it says on the tin | ||
+ | ** also trending topics | ||
== Find your library == | == Find your library == | ||
+ | |||
+ | https://dev.twitter.com/docs/twitter-libraries | ||
+ | |||
+ | * Perl: [http://search.cpan.org/dist/Net-Twitter Net::Twitter] | ||
+ | * Python: [https://github.com/tweepy/tweepy tweepy] and many others | ||
+ | * Ruby: [https://github.com/jnunemaker/twitter twitter] rubygem and others | ||
+ | |||
== Creating a new app == | == Creating a new app == | ||
Line 40: | Line 55: | ||
http://twitter.com/inetkami | http://twitter.com/inetkami | ||
https://github.com/rickscott/inetkami | https://github.com/rickscott/inetkami | ||
+ | |||
+ | == Other Miscellany == | ||
+ | |||
+ | * [http://www.readwriteweb.com/hack/2012/05/a-utility-that-makes-you-master-of-the-twitterverse.php t], a Ruby command-line interface to the Twitter API |
Revision as of 11:58, 24 May 2012
Presenter: Rick Scott - @shadowspar
Contents
API Overview
- https://dev.twitter.com/ is API central.
- other useful things linked therefrom: API Status, API Known Issues, blog & discussion
- https://dev.twitter.com/docs is the main documentation area
- you'll find yourself spending a lot of time here =)
Parts
The twitter API breaks down into three main areas
- the REST API
- query→response based access
- this is what you're most likely to use
- the Streaming API
- aka drinking from the firehose =)
- push-based communication w/ v.high ratelimit
- the Search API
- just like it says on the tin
- also trending topics
Find your library
https://dev.twitter.com/docs/twitter-libraries
- Perl: Net::Twitter
- Python: tweepy and many others
- Ruby: twitter rubygem and others
Creating a new app
- https://dev.twitter.com/apps/new
- sign in with your twitter account
- https://dev.twitter.com/terms/api-terms
- https://support.twitter.com/articles/76915 - automation rules and best practices
Rate limits
Rules of Conduct
Repeated tweets
General TOS
Example
http://twitter.com/inetkami https://github.com/rickscott/inetkami
Other Miscellany
- t, a Ruby command-line interface to the Twitter API