lib/sportradar/api/images.rb in sportradar-api-0.10.25 vs lib/sportradar/api/images.rb in sportradar-api-0.10.26
- old
+ new
@@ -46,11 +46,15 @@
end
alias_method :all_coaches, :coach_manifests
def venue_manifests
raise Sportradar::Api::Error::InvalidLeague unless league.nil?
- response = get request_url("venues/manifests/all_assets")
+ if version == 3
+ response = get request_url("venues/manifest")
+ else
+ response = get request_url("venues/manifests/all_assets")
+ end
if response.success? && response["assetlist"]
Sportradar::Api::Images::AssetList.new response["assetlist"]
else
response
end
@@ -107,11 +111,11 @@
elsif usat_premium
'usat_premium'
elsif uses_v2_api?
'usat'
elsif uses_v3_api?
- 'reuters'
+ sport == 'mlb' ? 'usat' : 'reuters'
end
end
def version
if uses_v3_api? || nfl_premium || usat_premium
@@ -140,14 +144,14 @@
def allowed_sports
v2_api_sports + v3_api_sports
end
def v2_api_sports
- ['golf', 'mlb', 'nascar', 'nba', 'nfl', 'nhl', 'ncaafb', 'ncaamb', 'mls']
+ ['golf', 'nascar', 'nba', 'nfl', 'nhl', 'ncaafb', 'ncaamb', 'mls']
end
def v3_api_sports
- ['soccer', 'cricket', 'f1', 'rugby', 'tennis']
+ ['mlb', 'soccer', 'cricket', 'f1', 'rugby', 'tennis']
end
def soccer_leagues
['bundesliga', 'epl', 'serie-a', 'la-liga', 'ligue-1']
end