Class: Levelup::Requests::AuthenticateApp

Inherits:
Base show all
Defined in:
lib/levelup/requests/authenticate_app.rb

Overview

Represents a request to generate an app access token.

Constant Summary

Constants inherited from Base

Base::ALLOWED_REQUEST_METHODS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#body, #headers, instance_variables_excluded_from_hash, #send_to_api

Methods inherited from Templates::DataParcel

excluded?, #initialize, instance_variables_excluded_from_hash

Constructor Details

This class inherits a constructor from Levelup::Templates::DataParcel

Instance Attribute Details

#api_keyObject

The API key assigned to your app



6
7
8
# File 'lib/levelup/requests/authenticate_app.rb', line 6

def api_key
  @api_key
end

#client_secretObject

The secret code assigned to your app



8
9
10
# File 'lib/levelup/requests/authenticate_app.rb', line 8

def client_secret
  @client_secret
end

Instance Method Details

#auth_typeObject



10
11
12
# File 'lib/levelup/requests/authenticate_app.rb', line 10

def auth_type
  :none
end

#response_from_hash(hash) ⇒ Object



14
15
16
# File 'lib/levelup/requests/authenticate_app.rb', line 14

def response_from_hash(hash)
  Responses::Success.new(hash['access_token'])
end