Skip to content

Instantly share code, notes, and snippets.

@mfojtik
Created May 3, 2011 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfojtik/953251 to your computer and use it in GitHub Desktop.
Save mfojtik/953251 to your computer and use it in GitHub Desktop.
Posting status update to Identi.ca
require 'rest-client'
class Identica
attr_reader :client
def initialize(username, password)
@client = RestClient::Resource.new("http://identi.ca/api", username, password)
end
def update(text)
self.client['statuses/update.xml'].post(:status => text)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment