lib/sportradar/api/content.rb in sportradar-api-0.11.1 vs lib/sportradar/api/content.rb in sportradar-api-0.11.3
- old
+ new
@@ -11,21 +11,21 @@
end
def news( date = Date.today, content_type: 'all' )
raise Sportradar::Api::Error::InvalidType unless allowed_news_types.include? content_type
response = get request_url("#{provider }/news/#{date_path(date)}/#{content_type}")
- if response.success? && response["content"]
- Sportradar::Api::Content::ArticleList.new response["content"]
+ if response.success? && response["items"]
+ Sportradar::Api::Content::ArticleList.new response.to_h
else
response
end
end
def analysis( date = Date.today, content_type: 'all' )
raise Sportradar::Api::Error::InvalidType unless allowed_analysis_types.include? content_type
response = get request_url("#{provider }/analysis/#{date_path(date)}/#{content_type}")
- if response.success? && response["content"]
- Sportradar::Api::Content::ArticleList.new response["content"]
+ if response.success? && response["items"]
+ Sportradar::Api::Content::ArticleList.new response.to_h
else
response
end
end