lib/sportradar/api/football/ncaafb.rb in sportradar-api-0.11.67 vs lib/sportradar/api/football/ncaafb.rb in sportradar-api-0.11.68
- old
+ new
@@ -31,10 +31,11 @@
# @year = data.dig('season', 'year') if data.dig('season', 'year')
# @type = data.dig('season', 'type') if data.dig('season', 'type')
create_data(@divisions_hash, data['divisions'], klass: Division, hierarchy: self, api: api) if data['divisions']
+ create_data(@divisions_hash, data['division'], klass: Division, hierarchy: self, api: api) if data['division']
create_data(@teams_hash, data['teams'], klass: Team, hierarchy: self, api: api) if data['teams']
if data['weeks']
create_data(@weeks_hash, data['weeks'], klass: Week, hierarchy: self, api: @api)
end
@@ -208,11 +209,11 @@
url, headers, options, timeout = api.get_request_info(path_depth_charts)
{url: url, headers: headers, params: options, timeout: timeout, callback: method(:ingest_depth_charts)}
end
## standings
- def get_standings
- data = api.get_data(path_standings).to_h
+ def get_standings(division = 'FBS')
+ data = api.get_data(path_standings(division)).to_h
ingest_standings(data)
end
def ingest_standings(data)
update(data, source: :teams)