Sha256: 742794b32fc92a5ead68c07d84dfeaa7578122dd422eed0f713b57eb540137b2

Contents?: true

Size: 345 Bytes

Versions: 157

Compression:

Stored size: 345 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

157 entries across 130 versions & 9 rubygems

Version Path
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/rubyurl.rb
paynow_sdk-0.1.9 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/rubyurl.rb
paynow_sdk-0.1.9 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/rubyurl.rb
paynow_sdk-0.1.9 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/rubyurl.rb
cli-nasa-0.1.1 vendor/bundle/ruby/2.7.0/gems/httparty-0.18.1/examples/rubyurl.rb
cli-nasa-0.1.0 vendor/bundle/ruby/2.7.0/gems/httparty-0.18.1/examples/rubyurl.rb
paynow_sdk-0.1.8 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/rubyurl.rb
paynow_sdk-0.1.7 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/rubyurl.rb
paynow_sdk-0.1.7 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.6/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/rubyurl.rb
httparty-0.18.1 examples/rubyurl.rb
httparty-0.18.0 examples/rubyurl.rb
httparty-0.17.3 examples/rubyurl.rb
httparty-responsibly-0.17.1 examples/rubyurl.rb
httparty-0.17.1 examples/rubyurl.rb
httparty-responsibly-0.17.0.r1 examples/rubyurl.rb
httparty-0.17.0 examples/rubyurl.rb
httparty-0.16.4 examples/rubyurl.rb
httparty-0.16.3 examples/rubyurl.rb
httparty-0.16.2 examples/rubyurl.rb
httparty-0.16.1 examples/rubyurl.rb