Class: OmniAuth::Strategies::LastFm

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

Overview

Authenticate to LastFM

use OmniAuth::Strategies::LastFm, 'API Key', 'Secret Key'

Examples:

Basic Usage

Defined Under Namespace

Classes: CallbackError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of LastFm.

Parameters:

  • app (Rack Application)

    standard middleware application parameter

  • api_key (String)

    the application id as registered on LastFM

  • secret_key (String)

    the application secret as registered on LastFM

  • options, (Hash)

    a customizable set of options



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

def initialize(app, api_key, secret_key, options = {})
  super(app, :last_fm)
  @api_key = api_key
  @secret_key = secret_key
  @options = options
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



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

def api_key
  @api_key
end

#optionsObject

Returns the value of attribute options.



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

def options
  @options
end

#secret_keyObject

Returns the value of attribute secret_key.



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

def secret_key
  @secret_key
end