Class: Googleurlshortener::Authenticated
- Defined in:
- lib/googleurlshortener.rb
Instance Method Summary collapse
- #analytics(short_url) ⇒ Object
-
#initialize(email, password) ⇒ Authenticated
constructor
A new instance of Authenticated.
Methods inherited from Default
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 |