Sha256: 8715f69739d2dc4c7fa705f33a36bb75dcef425db2b245323a010dbcd261a241

Contents?: true

Size: 358 Bytes

Versions: 136

Compression:

Stored size: 358 Bytes

Contents

dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
require File.join(dir, 'httparty')
require 'pp'

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

pp Rubyurl.shorten( 'http://istwitterdown.com/')

Version data entries

136 entries across 135 versions & 28 rubygems

Version Path
httparty-0.8.3 examples/rubyurl.rb
httparty-0.8.2 examples/rubyurl.rb
spreedly-1.3.5 vendor/httparty/examples/rubyurl.rb
nutshell-crm-0.0.6.alpha vendor/bundle/gems/httparty-0.8.1/examples/rubyurl.rb
nutshell-crm-0.0.5 vendor/bundle/gems/httparty-0.8.1/examples/rubyurl.rb
nutshell-crm-0.0.4 vendor/bundle/gems/httparty-0.8.1/examples/rubyurl.rb
nutshell-crm-0.0.3 vendor/bundle/gems/httparty-0.8.1/examples/rubyurl.rb
nutshell-crm-0.0.2 vendor/bundle/gems/httparty-0.8.1/examples/rubyurl.rb
nutshell-crm-0.0.1 vendor/bundle/gems/httparty-0.8.1/examples/rubyurl.rb
httparty-0.8.1 examples/rubyurl.rb
httparty-0.8.0 examples/rubyurl.rb
httparty2-0.7.10 examples/rubyurl.rb
httparty-0.7.8 examples/rubyurl.rb
httparty-0.7.7 examples/rubyurl.rb
httparty-0.7.6 examples/rubyurl.rb
httparty-0.7.4 examples/rubyurl.rb
httparty-0.7.3 examples/rubyurl.rb
httparty-0.7.2 examples/rubyurl.rb
httparty-0.7.0 examples/rubyurl.rb
spreedly-1.3.4 vendor/httparty/examples/rubyurl.rb