Class: Fleakr::Api::AuthenticationRequest

Inherits:
Object
  • Object
show all
Includes:
Support::Request
Defined in:
lib/fleakr/api/authentication_request.rb

Overview

AuthenticationRequest

Handles authentication requests for the web authentication method. Requires that Fleakr.api_key and Fleakr.shared_secret both be set.

Instance Attribute Summary

Attributes included from Support::Request

#parameters

Instance Method Summary collapse

Methods included from Support::Request

#endpoint_uri, #initialize

Instance Method Details

#authorization_urlObject

The authorization URL that the user should be redirected to.


25
26
27
# File 'lib/fleakr/api/authentication_request.rb', line 25

def authorization_url
  @authorization_url ||= response.header['Location']
end

#endpoint_urlObject

The endpoint for the authentication request


15
16
17
# File 'lib/fleakr/api/authentication_request.rb', line 15

def endpoint_url
  'http://flickr.com/services/auth/'
end

#responseObject

:nodoc:


19
20
21
# File 'lib/fleakr/api/authentication_request.rb', line 19

def response # :nodoc:
  Net::HTTP.get_response(endpoint_uri)
end