Class: Sportradar::Configuration
- Inherits:
-
Object
- Object
- Sportradar::Configuration
- Defined in:
- lib/sportradar/client/configuration.rb
Instance Attribute Summary collapse
-
#access_level ⇒ Object
writeonly
Sets the attribute access_level.
- #api_keys ⇒ Object
- #base_uri ⇒ Object
- #filepath ⇒ Object
-
#http ⇒ Object
readonly
Returns the value of attribute http.
Instance Method Summary collapse
Instance Attribute Details
#access_level=(value) ⇒ Object (writeonly)
Sets the attribute access_level
20 21 22 |
# File 'lib/sportradar/client/configuration.rb', line 20 def access_level=(value) @access_level = value end |
#api_keys ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/sportradar/client/configuration.rb', line 25 def api_keys { 'mlb' => ENV['SPORTRADAR_API_KEY_MLB'], 'nba' => ENV['SPORTRADAR_API_KEY_NBA'], 'nfl' => ENV['SPORTRADAR_API_KEY_NFL'], 'nhl' => ENV['SPORTRADAR_API_KEY_NHL'], } end |
#base_uri ⇒ Object
43 44 45 |
# File 'lib/sportradar/client/configuration.rb', line 43 def base_uri @base_uri ||= URI('https://api.sportradar.us') end |
#filepath ⇒ Object
54 55 56 |
# File 'lib/sportradar/client/configuration.rb', line 54 def filepath @filepath ||= ENV['SPORTRADAR_FILE_PATH'] end |
#http ⇒ Object (readonly)
Returns the value of attribute http.
19 20 21 |
# File 'lib/sportradar/client/configuration.rb', line 19 def http @http end |
Instance Method Details
#access_levels ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/sportradar/client/configuration.rb', line 34 def access_levels { 'mlb' => ENV['SPORTRADAR_ACCESS_LEVEL_MLB'], 'nba' => ENV['SPORTRADAR_ACCESS_LEVEL_NBA'], 'nfl' => ENV['SPORTRADAR_ACCESS_LEVEL_NFL'], 'nhl' => ENV['SPORTRADAR_ACCESS_LEVEL_NHL'], } end |