Class: Googleurlshortener::Authenticated

Inherits:
Default
  • Object
show all
Defined in:
lib/googleurlshortener.rb

Instance Method Summary collapse

Methods inherited from Default

#expand, #shorten

Constructor Details

#initialize(email, password) ⇒ Authenticated

Returns a new instance of Authenticated.



48
49
50
# File 'lib/googleurlshortener.rb', line 48

def initialize(email, password)
  @auth_token = get_authentication_token(email, password)
end

Instance Method Details

#analytics(short_url) ⇒ Object



52
53
54
# File 'lib/googleurlshortener.rb', line 52

def analytics(short_url)
  return get_json_response("https://www.googleapis.com/urlshortener/v1/url?shortUrl=#{short_url}&projection=FULL")
end