Class: OmniAuth::Strategies::Flickr

Inherits:
Object
  • Object
show all
Includes:
OmniAuth::Strategy
Defined in:
lib/omniauth/strategies/flickr.rb

Overview

Authenticate to Flickr

Examples:

Basic Usage


use OmniAuth::Strategies::Flickr, 'API Key', 'Secret Key', :scope => 'read'

Defined Under Namespace

Classes: CallbackError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app, api_key, secret_key, options = {}) ⇒ Flickr

Returns a new instance of Flickr.

Parameters:

  • app (Rack Application)

    standard middleware application parameter

  • api_key (String)

    the application id as [registered on Flickr](www.flickr.com/services/apps/)

  • secret_key (String)

    the application secret as [registered on Flickr](www.flickr.com/services/apps/)

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • 'read','write','delete] ('read', 'write', 'delete] :scope ('read') the scope of your authorization request; must be `read` or 'write' or 'delete')

    :scope (‘read’) the scope of your authorization request; must be ‘read` or ’write’ or ‘delete’



31
32
33
34
35
36
# File 'lib/omniauth/strategies/flickr.rb', line 31

def initialize(app, api_key, secret_key, options = {})
  super(app, :flickr)
  @api_key = api_key
  @secret_key = secret_key
  @options = {:scope => 'read'}.merge(options)
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



16
17
18
# File 'lib/omniauth/strategies/flickr.rb', line 16

def api_key
  @api_key
end

#optionsObject

Returns the value of attribute options.



16
17
18
# File 'lib/omniauth/strategies/flickr.rb', line 16

def options
  @options
end

#secret_keyObject

Returns the value of attribute secret_key.



16
17
18
# File 'lib/omniauth/strategies/flickr.rb', line 16

def secret_key
  @secret_key
end