Sha256: 742794b32fc92a5ead68c07d84dfeaa7578122dd422eed0f713b57eb540137b2
Contents?: true
Size: 345 Bytes
Versions: 155
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
155 entries across 129 versions & 8 rubygems