/ Published in: Ruby
Simple wrapper for Twitter API.
Expand |
Embed | Plain Text
require 'rest' module Twitter URL = "http://twitter.com/" class Connection def initialize(username, password) @conn = REST::Connection.new(URL, :username => username, :password => password) @status = Status.new(@conn) end attr_reader :status end class Status def initialize(conn) @conn = conn end def update(message) res = @conn.request_post("statuses/update.xml", :status => message) end end end
Comments
Subscribe to comments
You need to login to post a comment.

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!
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/