Class: Shorty::Isgd

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/shorty/isgd.rb

Overview

is.gd API as defined is.gd/api_info.php

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.shorten(url) ⇒ Object



10
11
12
# File 'lib/shorty/isgd.rb', line 10

def self.shorten(url)
  get('http://is.gd/api.php', :query => {:longurl => url})
end

Instance Method Details

#shorten(url) ⇒ Object



6
7
8
# File 'lib/shorty/isgd.rb', line 6

def shorten(url)
  self.class.get('http://is.gd/api.php', :query => {:longurl => url})
end