Class: EasyLlama::Client::OAuth

Inherits:
Api
  • Object
show all
Defined in:
lib/easyllama/oauth.rb

Overview

This class provides methods for interacting with the Easy Llama API for OAuth.

Constant Summary

Constants inherited from Api

Api::DEFAULT_API_VERSION, Api::DEFAULT_URI_BASE

Instance Method Summary collapse

Methods inherited from Api

#parse_response!, #send_request

Constructor Details

#initialize(client_id, client_secret) ⇒ Object

Initializes the OAuth client.

Parameters:

  • client_id (String)

    The client ID.

  • client_secret (String)

    The client secret.



12
13
14
15
16
17
18
# File 'lib/easyllama/oauth.rb', line 12

def initialize(client_id, client_secret)
  access_token = get_access_token(client_id, client_secret)

  EasyLlama::Client.api_token = access_token

  super access_token
end