Module: PUBG::Default
- Defined in:
- lib/pubg/default.rb
Overview
DEfault configuration options for Client
Constant Summary collapse
- API_ENDPOINT =
Default API Endpoint
'https://api.playbattlegrounds.com'.freeze
- REGION =
Default region
'xbox-na'.freeze
- DEFAULT_MEDIA_TYPE =
Default media type
'application/vnd.api+json'.freeze
Class Method Summary collapse
- .access_token ⇒ Object
- .api_endpoint ⇒ Object
- .connection_options ⇒ Object
- .options ⇒ Object
- .region ⇒ Object
Class Method Details
.access_token ⇒ Object
22 23 24 |
# File 'lib/pubg/default.rb', line 22 def access_token ENV['PUBG_ACCESS_TOKEN'] end |
.api_endpoint ⇒ Object
18 19 20 |
# File 'lib/pubg/default.rb', line 18 def api_endpoint API_ENDPOINT end |
.connection_options ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/pubg/default.rb', line 30 def { headers: { accept: DEFAULT_MEDIA_TYPE } } end |
.options ⇒ Object
14 15 16 |
# File 'lib/pubg/default.rb', line 14 def Hash[PUBG::Configurable.keys.map { |key| [key, send(key)] }] end |
.region ⇒ Object
26 27 28 |
# File 'lib/pubg/default.rb', line 26 def region ENV['PUBG_REGION'] || REGION end |