sportradar-api 0.12.2 → 0.12.3
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/play.rb +7 -3
- data/lib/sportradar/api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01260a238e645408f519ae980033af6a440c7279
|
4
|
+
data.tar.gz: b03cbcc37a6ad969169e740224794fd198eaa0ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96a42316a082839e18aa00b4e8779ad455701f5151f07c1a877487f3aa56730c81966d7ad1934d12935bb7acc116b5eb978d79ce9f5d9ea6044f823cffa0e690
|
7
|
+
data.tar.gz: 25267de1237712fca8a9c9beef644ea2f47c46d28032631b8751119d33eaf856a8e0f0b74108f8064fef1b570b32b1a5161375c70417d69ca782a4b0dadfa718
|
data/Gemfile.lock
CHANGED
@@ -2,7 +2,7 @@ module Sportradar
|
|
2
2
|
module Api
|
3
3
|
module Football
|
4
4
|
class Play < Data
|
5
|
-
attr_accessor :response, :id, :sequence, :reference, :clock, :home_points, :away_points, :type, :play_clock, :wall_clock, :start_situation, :end_situation, :description, :alt_description, :statistics, :score, :scoring_play, :team_id, :player_id, :play_type, :players, :down, :yfd, :player_data, :event_type
|
5
|
+
attr_accessor :response, :id, :sequence, :reference, :clock, :home_points, :away_points, :type, :play_clock, :wall_clock, :start_situation, :end_situation, :description, :alt_description, :statistics, :score, :scoring_play, :team_id, :player_id, :play_type, :players, :down, :yfd, :player_data, :event_type, :wall_clock
|
6
6
|
|
7
7
|
def initialize(data, **opts)
|
8
8
|
@response = data
|
@@ -32,7 +32,8 @@ module Sportradar
|
|
32
32
|
@clock = data["clock"] if data["clock"]
|
33
33
|
@type = data["type"] if data["type"]
|
34
34
|
@summary = data["summary"] if data["summary"]
|
35
|
-
@updated = data["updated"]
|
35
|
+
@updated = Time.parse(data["updated"]) if data["updated"]
|
36
|
+
@wall_clock = Time.parse(data["wall_clock"]) if data["wall_clock"]
|
36
37
|
@side = data["side"] if data["side"]
|
37
38
|
@yard_line = data["yard_line"] if data["yard_line"]
|
38
39
|
@down = data["down"] if data["down"]
|
@@ -58,11 +59,14 @@ module Sportradar
|
|
58
59
|
@statistics ||= OpenStruct.new(players: [])
|
59
60
|
end
|
60
61
|
parse_player
|
61
|
-
@wall_clock = data["wall_clock"]
|
62
62
|
|
63
63
|
self
|
64
64
|
end
|
65
65
|
|
66
|
+
def updated
|
67
|
+
@updated || @wall_clock
|
68
|
+
end
|
69
|
+
|
66
70
|
def clock_seconds
|
67
71
|
m,s = @clock.split(':')
|
68
72
|
m.to_i * 60 + s.to_i
|
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.12.
|
4
|
+
version: 0.12.3
|
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-10-
|
11
|
+
date: 2017-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|