lib/sportradar/api/basketball/nba/api.rb in sportradar-api-0.14.0 vs lib/sportradar/api/basketball/nba/api.rb in sportradar-api-0.15.0
- old
+ new
@@ -20,28 +20,28 @@
def default_season
'reg'
end
def default_access_level
if (ENV['SPORTRADAR_ENV'] || ENV['RACK_ENV'] || ENV['RAILS_ENV']) == 'production'
- 'p'
+ 'production'
else
- 't'
+ 'trial'
end
end
def content_format
'json'
end
private
def request_url(path)
- "/nba-#{access_level}#{version}/#{path}"
+ "/nba/#{access_level}/v#{version}/en/#{path}"
end
def api_key
- if !['t', 'sim'].include?(access_level) || (access_level == 'sim' && default_access_level == 'p')
+ if !['trial', 'sim'].include?(access_level) || (access_level == 'sim' && default_access_level == 'production')
Sportradar::Api.api_key_params('nba', 'production')
else
Sportradar::Api.api_key_params('nba')
end
end
@@ -49,10 +49,10 @@
def version
Sportradar::Api.version('nba')
end
def allowed_access_levels
- %w[p t sim]
+ %w[production trial sim]
end
def allowed_seasons
["pre", "reg", "pst"]
end