class Shortly::Clients::Isgd
Public Class Methods
shorten(url, options = {})
click to toggle source
shorts provided url by making call to is.gd api with given options.
# File lib/shortly/clients/isgd.rb, line 32 def self.shorten(url, options = {}) validate_uri!(url) options = {:format => "json", :url => url}.merge(options) response = get("/create.php", get_params(options)) OpenStruct.new(JSON.parse(response.body)) end