sportradar-api 0.11.67 → 0.11.68
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72129cf0a3719c15d720303c948d772b1c884732
|
4
|
+
data.tar.gz: 8eb0f9d999d9654063df9085d64070082a807223
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efd743ee010ac68d3dce610d4315c8bd78c9a3931eb3270499587cb459c365ddf70f56320595d2f5344b319243a69e8419df2f770bd1ad88351055f6abb93c31
|
7
|
+
data.tar.gz: 65a4f129a70c4ef95d135f1c2e3c7b15e3c1e4f0e14723183959581c368a12e0cac7820b02033da2643d81403c99993c47f9003930e39ad3cc1f7daf994c7f04
|
data/Gemfile.lock
CHANGED
@@ -33,6 +33,7 @@ module Sportradar
|
|
33
33
|
# @type = data.dig('season', 'type') if data.dig('season', 'type')
|
34
34
|
|
35
35
|
create_data(@divisions_hash, data['divisions'], klass: Division, hierarchy: self, api: api) if data['divisions']
|
36
|
+
create_data(@divisions_hash, data['division'], klass: Division, hierarchy: self, api: api) if data['division']
|
36
37
|
create_data(@teams_hash, data['teams'], klass: Team, hierarchy: self, api: api) if data['teams']
|
37
38
|
|
38
39
|
if data['weeks']
|
@@ -210,8 +211,8 @@ module Sportradar
|
|
210
211
|
end
|
211
212
|
|
212
213
|
## standings
|
213
|
-
def get_standings
|
214
|
-
data = api.get_data(path_standings).to_h
|
214
|
+
def get_standings(division = 'FBS')
|
215
|
+
data = api.get_data(path_standings(division)).to_h
|
215
216
|
ingest_standings(data)
|
216
217
|
end
|
217
218
|
|
@@ -12,6 +12,11 @@ module Sportradar
|
|
12
12
|
3 - remaining_timeouts.to_i
|
13
13
|
end
|
14
14
|
|
15
|
+
def parse_records(data)
|
16
|
+
@records['overall'] = Record.new(data['overall'], type: 'overall')
|
17
|
+
# data['records'].each { |record| @records[record['record_type']] = Record.new(record, type: record['record_type']) }
|
18
|
+
end
|
19
|
+
|
15
20
|
def players
|
16
21
|
get_roster if @players_hash.empty?
|
17
22
|
@players_hash.values
|
@@ -32,11 +32,11 @@ module Sportradar
|
|
32
32
|
|
33
33
|
@seed = data['seed'].to_i if data['seed']
|
34
34
|
@alias = data['alias'] if data['alias']
|
35
|
-
@points = data['points'].to_i if data['points']
|
35
|
+
@points = data['points'].to_i if data['points'] && data['points'].kind_of?(Integer)
|
36
36
|
@used_timeouts = data['used_timeouts'] if data['used_timeouts']
|
37
37
|
@remaining_timeouts = data['remaining_timeouts'] if data['remaining_timeouts']
|
38
38
|
|
39
|
-
parse_records(data) if data['records']
|
39
|
+
parse_records(data) if data['records'] || data['overall']
|
40
40
|
parse_players(data.dig('players'), opts[:game]) if data.dig('players')
|
41
41
|
# parse_stats(data['statistics']) if data['statistics']
|
42
42
|
if opts[:game]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sportradar-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.68
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Eggett
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|