Class: Shortly::Clients::Isgd
- Inherits:
-
Shortly::Client
- Object
- Shortly::Client
- Shortly::Clients::Isgd
- Defined in:
- lib/shortly/clients/isgd.rb
Direct Known Subclasses
Class Method Summary collapse
-
.shorten(url, options = {}) ⇒ Object
shorts provided url by making call to is.gd api with given options.
Methods inherited from Shortly::Client
Class Method Details
.shorten(url, options = {}) ⇒ Object
shorts provided url by making call to is.gd api with given options.
32 33 34 35 36 37 |
# File 'lib/shortly/clients/isgd.rb', line 32 def self.shorten(url, = {}) validate_uri!(url) = {:format => "json", :url => url}.merge() response = get("/create.php", get_params()) OpenStruct.new(JSON.parse(response.body)) end |