sportradar-api 0.1.33 → 0.1.34
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: f7e1ba38dc4bce7adaa6728bb8a8f27c2baf087b
|
4
|
+
data.tar.gz: cdfde44f1618ecfe593fa22a2ec0e4eb43d1ff0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d4520f69a5cdb3f338c25694a0976318a772c26155c634bb6e071a0802ab6c243c57d54fadb63f648d7226582e3966c6d5319a31248e4bd048125c090e5e24e
|
7
|
+
data.tar.gz: d793a289b59ef10aa312b21ad4e5eedb653dd620fec5370cbf975b027546c7d6374ed66f24e20e7c2e6652082ac611da41c4578264f402e14274480a188d1018
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sportradar-api (0.1.
|
4
|
+
sportradar-api (0.1.33)
|
5
5
|
activesupport
|
6
6
|
httparty (>= 0.14.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (5.0.0)
|
11
|
+
activesupport (5.0.0.1)
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
13
|
i18n (~> 0.7)
|
14
14
|
minitest (~> 5.1)
|
@@ -7,7 +7,7 @@ module Sportradar
|
|
7
7
|
def initialize(data)
|
8
8
|
@response = data
|
9
9
|
set_stats
|
10
|
-
|
10
|
+
@player = Sportradar::Api::Nfl::Player.new(response) if response['name'] # this isn't used yet, and we need to determine a better solution
|
11
11
|
end
|
12
12
|
|
13
13
|
def players
|
@@ -7,7 +7,7 @@ module Sportradar
|
|
7
7
|
@attempts = response["attempts"]
|
8
8
|
@completions = response["completions"]
|
9
9
|
@cmp_pct = response["cmp_pct"]
|
10
|
-
@yards = response["yards"]
|
10
|
+
# @yards = response["yards"]
|
11
11
|
@avg_yards = response["avg_yards"]
|
12
12
|
@sacks = response["sacks"]
|
13
13
|
@sack_yards = response["sack_yards"]
|
@@ -17,7 +17,8 @@ module Sportradar
|
|
17
17
|
@rating = response["rating"]
|
18
18
|
@longest_touchdown = response["longest_touchdown"]
|
19
19
|
@air_yards = response["air_yards"]
|
20
|
-
@net_yards = response["net_yards"] # passing net_yards is the correct measure for team stats, as it includes sack yardage
|
20
|
+
@net_yards = response["net_yards"] # passing net_yards is the correct measure for team stats, as it includes sack yardage
|
21
|
+
@yards = response["net_yards"] # should look further into this, make sure this isn't a bad idea
|
21
22
|
@redzone_attempts = response["redzone_attempts"]
|
22
23
|
end
|
23
24
|
end
|
@@ -38,9 +38,9 @@ module Sportradar
|
|
38
38
|
@away = Sportradar::Api::Nfl::Team.new data["away"] || location["away"] if data["away"] || location["away"]
|
39
39
|
@broadcast = Sportradar::Api::Nfl::Broadcast.new data["broadcast"] if data["broadcast"]
|
40
40
|
if data["team"]
|
41
|
-
|
42
|
-
@home.stats =
|
43
|
-
@away.stats =
|
41
|
+
@stats = data["team"].map { |hash| [hash["id"], Sportradar::Api::Nfl::GameStatistic.new(hash)] }.to_h
|
42
|
+
@home.stats = @stats[@home.id]
|
43
|
+
@away.stats = @stats[@away.id]
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|