lib/sportradar/api/baseball/mlb/api.rb in sportradar-api-0.15.1 vs lib/sportradar/api/baseball/mlb/api.rb in sportradar-api-0.16.0
- old
+ new
@@ -25,28 +25,28 @@
def default_season
'reg'
end
def default_access_level
if (ENV['SPORTRADAR_ENV_MLB'] || 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)
- "/mlb-#{access_level}#{version}/#{path}"
+ "/mlb/#{access_level}/v#{version}/en/#{path}"
end
def api_key
- if !['t', 'sim'].include?(access_level)
+ if !['trial', 'sim'].include?(access_level)
Sportradar::Api.api_key_params('mlb', 'production')
elsif 'sim' == access_level
Sportradar::Api.api_key_params('mlb', 'simulation')
else
Sportradar::Api.api_key_params('mlb')
@@ -56,10 +56,10 @@
def version
@version || Sportradar::Api.version('mlb')
end
def allowed_access_levels
- %w[p t sim]
+ %w[production trial sim]
end
def allowed_seasons
["pre", "reg", "pst"]
end