Created
September 2, 2008 22:29
-
-
Save robbyrussell/8483 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'httparty' | |
class Rubyurl | |
include HTTParty | |
base_uri 'rubyurl.com' | |
def self.shorten( website_url ) | |
post( '/api/links.json', :query => { :link => { :website_url => website_url } } ) | |
end | |
end | |
puts Rubyurl.shorten( 'http://istwitterdown.com/' ).inspect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment