Posted By

felipec on 04/15/07


Tagged

web20 twitter


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

maxkks
sergeizen
skammer
webstic


Ruby Twitter


 / Published in: Ruby
 

Simple wrapper for Twitter API.

  1. require 'rest'
  2.  
  3. module Twitter
  4. URL = "http://twitter.com/"
  5.  
  6. class Connection
  7. def initialize(username, password)
  8. @conn = REST::Connection.new(URL, :username => username, :password => password)
  9. @status = Status.new(@conn)
  10. end
  11.  
  12. attr_reader :status
  13. end
  14.  
  15. class Status
  16. def initialize(conn)
  17. @conn = conn
  18. end
  19.  
  20. def update(message)
  21. res = @conn.request_post("statuses/update.xml", :status => message)
  22. end
  23. end
  24. end

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: mbbx6spp on July 10, 2007

Twitter4R (an open source Ruby library that contains bindings for the Twitter REST API) v0.2.0 has 100% Twitter REST API coverage already. Check out the following links for more information: * Project Website * Twitter4R v0.2.0 Release * Twitter4R v0.2.0 RDoc

Enjoy!

Posted By: mbbx6spp on July 10, 2007

Woops the links didn't come through in Markdown markup.

Project Website: http://twitter4r.rubyforge.org

Twitter4R v0.2.0 Release: http://snakesgemscoffee.blogspot.com/2007/07/twitter4r-020-release.html

Twitter4R v0.2.0 RDoc: http://twitter4r.rubyforge.org/releases/v0.2.0/rdoc/

You need to login to post a comment.