Difference between revisions of "C4LN 2012: Intro to the Twitter API"

From Code4Lib
Jump to: navigation, search
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 (query→response based access)
+
* the '''REST API'''
* the Streaming API (drinking from the firehose)
+
** query→response based access
* the Search API (just like it says on the tin)
+
** 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

API Overview


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


Creating a new app


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