Class: BaseApi::Default

Inherits:
Object
  • Object
show all
Defined in:
lib/base_api/default.rb

Class Method Summary collapse

Class Method Details

.access_tokenObject



24
25
26
# File 'lib/base_api/default.rb', line 24

def access_token
  ENV['BASE_API_ACCESS_TOKEN']
end

.client_idObject



12
13
14
# File 'lib/base_api/default.rb', line 12

def client_id
  ENV['BASE_API_CLIENT_ID']
end

.client_secretObject



16
17
18
# File 'lib/base_api/default.rb', line 16

def client_secret
  ENV['BASE_API_CLIENT_SECRET']
end

.codeObject



20
21
22
# File 'lib/base_api/default.rb', line 20

def code
  ENV['BASE_API_CODE']
end

.limitObject



32
33
34
# File 'lib/base_api/default.rb', line 32

def limit
  ENV.fetch("BASE_API_LIMIT") { 20 }
end

.offsetObject



36
37
38
# File 'lib/base_api/default.rb', line 36

def offset
  ENV.fetch("BASE_API_OFFSET") { 0 }
end

.optionsHash

Configuration options

Returns:

  • (Hash)


8
9
10
# File 'lib/base_api/default.rb', line 8

def options
  Hash[BaseApi::Configurable.keys.map{|key| [key, send(key)]}]
end

.redirect_uriObject



40
41
42
# File 'lib/base_api/default.rb', line 40

def redirect_uri
  ENV['BASE_API_REDIRECT_URI']
end

.refresh_tokenObject



28
29
30
# File 'lib/base_api/default.rb', line 28

def refresh_token
  ENV['BASE_API_REFRESH_TOKEN']
end