lib/sportradar/api/images.rb in sportradar-api-0.13.12 vs lib/sportradar/api/images.rb in sportradar-api-0.13.13
- old
+ new
@@ -37,22 +37,20 @@
alias_method :all_players, :player_manifests
# Coach Manifests
def coach_manifests
- raise Sportradar::Api::Error::InvalidLeague unless league.nil?
response = get request_url("coaches/#{image_type}/manifests/all_assets")
if response.success? && response["assetlist"]
Sportradar::Api::Images::AssetList.new response["assetlist"]
else
response
end
end
alias_method :all_coaches, :coach_manifests
def venue_manifests
- raise Sportradar::Api::Error::InvalidLeague unless league.nil?
if version == 3
response = get request_url("venues/manifest")
else
response = get request_url("venues/manifests/all_assets")
end
@@ -95,10 +93,10 @@
alias_method :venue_images, :image_url
private
def request_url(path)
- "/#{sport}-images-#{access_level}#{version}/#{provider}/#{path}"
+ "/#{sport}-images-#{access_level}#{version}/#{provider}/#{( league + '/') if league}/#{path}"
end
def api_key
if league