Class: BaseApi::Default
- Inherits:
-
Object
- Object
- BaseApi::Default
- Defined in:
- lib/base_api/default.rb
Class Method Summary collapse
- .access_token ⇒ Object
- .client_id ⇒ Object
- .client_secret ⇒ Object
- .code ⇒ Object
- .limit ⇒ Object
- .offset ⇒ Object
-
.options ⇒ Hash
Configuration options.
- .redirect_uri ⇒ Object
- .refresh_token ⇒ Object
Class Method Details
.access_token ⇒ Object
24 25 26 |
# File 'lib/base_api/default.rb', line 24 def access_token ENV['BASE_API_ACCESS_TOKEN'] end |
.client_id ⇒ Object
12 13 14 |
# File 'lib/base_api/default.rb', line 12 def client_id ENV['BASE_API_CLIENT_ID'] end |
.client_secret ⇒ Object
16 17 18 |
# File 'lib/base_api/default.rb', line 16 def client_secret ENV['BASE_API_CLIENT_SECRET'] end |
.code ⇒ Object
20 21 22 |
# File 'lib/base_api/default.rb', line 20 def code ENV['BASE_API_CODE'] end |
.limit ⇒ Object
32 33 34 |
# File 'lib/base_api/default.rb', line 32 def limit ENV.fetch("BASE_API_LIMIT") { 20 } end |
.offset ⇒ Object
36 37 38 |
# File 'lib/base_api/default.rb', line 36 def offset ENV.fetch("BASE_API_OFFSET") { 0 } end |
.options ⇒ Hash
Configuration options
8 9 10 |
# File 'lib/base_api/default.rb', line 8 def Hash[BaseApi::Configurable.keys.map{|key| [key, send(key)]}] end |
.redirect_uri ⇒ Object
40 41 42 |
# File 'lib/base_api/default.rb', line 40 def redirect_uri ENV['BASE_API_REDIRECT_URI'] end |
.refresh_token ⇒ Object
28 29 30 |
# File 'lib/base_api/default.rb', line 28 def refresh_token ENV['BASE_API_REFRESH_TOKEN'] end |