sportradar-api 0.11.63 → 0.11.64
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sportradar/api/football/scoring.rb +5 -10
- data/lib/sportradar/api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4966a3e98822f0addc6a0ccfa1111ecb4ce58222
|
4
|
+
data.tar.gz: ac70e594f57b501ce29dd2db4005cdea67f110cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9d8d3057df0ede540cf34d9c04066d5d25ea7ba398def89146f6f49f20dd9e93c46e73490c870e428a0e722cd193d3b3097335bec16b928572b7520474c995c
|
7
|
+
data.tar.gz: c9af893d5859cf680f5225466a687202f2e3ec860a3ace8138c526ca135fbafd1cbca361a0a6fc3bd95712be0be1b38a3e9cc396089cb80ef7af1ade72c8cfdf
|
data/Gemfile.lock
CHANGED
@@ -66,16 +66,11 @@ module Sportradar
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def parse_from_pbp(data)
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
# overtimes = [overtimes] if !overtimes.is_a?(Array)
|
75
|
-
# quarters = quarters[0] if (quarters.is_a?(Array) && (quarters.size == 1) && quarters.first.is_a?(Array))
|
76
|
-
# data = (quarters + overtimes).compact.map{|q| q['scoring'] }
|
77
|
-
# data.map.with_index(1) { |h, i| [i, { h.dig('home', 'id') => h.dig('home', 'points').to_i, h.dig('away', 'id') => h.dig('away', 'points').to_i }] }.to_h
|
78
|
-
{}
|
69
|
+
return {} unless data['periods']
|
70
|
+
quarters = data['periods']
|
71
|
+
overtimes = Array(data['overtime'])
|
72
|
+
data = (quarters + overtimes).compact.map{|q| q['scoring'] }
|
73
|
+
data.map.with_index(1) { |h, i| [i, { h.dig('home', 'id') => h.dig('home', 'points').to_i, h.dig('away', 'id') => h.dig('away', 'points').to_i }] }.to_h
|
79
74
|
end
|
80
75
|
|
81
76
|
# def period_name
|