sportradar-api 0.10.35 → 0.10.36
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: 11a19a012550a488244e58258b18d9ef23877c8e
|
4
|
+
data.tar.gz: c2faeb46c9cdc2db6d2a67abc34e917a7d3256e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3097d7332f8427d989dcbdbe006659f72714fa5d99c290df309e85ce9f32bdedb90de9067bad1c7de18c28a3c89a75b53bf20575545cc130f953d2bd27465f6
|
7
|
+
data.tar.gz: 25b2d67f5a1af759832e706e9681b9ea00d140c594f027e980ced6b6f11b2ee590315720434905b98011bfcec2fb4bb775e9e15c51596bdae85ae12357bea571
|
data/Gemfile.lock
CHANGED
@@ -4,7 +4,7 @@ module Sportradar
|
|
4
4
|
class Game < Data
|
5
5
|
attr_accessor :response, :id, :title, :home_id, :away_id, :score, :status, :coverage, :scheduled, :venue, :broadcast, :duration, :attendance, :team_stats, :player_stats, :changes
|
6
6
|
|
7
|
-
attr_reader :inning, :half, :outs, :bases, :pitchers
|
7
|
+
attr_reader :inning, :half, :outs, :bases, :pitchers, :final, :rescheduled, :inning_over
|
8
8
|
attr_reader :outcome, :count
|
9
9
|
DEFAULT_BASES = { '1' => nil, '2' => nil, '3' => nil }
|
10
10
|
|
@@ -119,6 +119,9 @@ module Sportradar
|
|
119
119
|
@duration = data['duration'] if data['duration']
|
120
120
|
@attendance = data['attendance'] if data['attendance']
|
121
121
|
|
122
|
+
@final = data['final'] if data['final']
|
123
|
+
@rescheduled = data['rescheduled'] if data['rescheduled']
|
124
|
+
|
122
125
|
@team_ids = { home: @home_id, away: @away_id}
|
123
126
|
|
124
127
|
update_bases(data)
|
@@ -159,7 +162,9 @@ module Sportradar
|
|
159
162
|
raise e
|
160
163
|
end
|
161
164
|
def advance_inning
|
165
|
+
@inning_over = false
|
162
166
|
return unless count['outs'] == 3
|
167
|
+
@inning_over = true
|
163
168
|
@bases = DEFAULT_BASES.dup
|
164
169
|
half, inn = if count['inning_half'] == 'B'
|
165
170
|
['T', count['inning'] += 1]
|
@@ -2,7 +2,7 @@ module Sportradar
|
|
2
2
|
module Api
|
3
3
|
module Baseball
|
4
4
|
class Pitch < Data
|
5
|
-
attr_accessor :response, :id, :at_bat, :outcome_id, :status, :count, :is_ab_over, :warming_up, :runners, :errors, :pitch_type_name, :x, :y, :zone, :total_pitch_count, :speed, :outcome, :hit_type, :balls, :strikes, :outs
|
5
|
+
attr_accessor :response, :id, :at_bat, :outcome_id, :status, :count, :is_ab_over, :is_hit, :warming_up, :runners, :errors, :pitch_type_name, :x, :y, :zone, :total_pitch_count, :speed, :outcome, :hit_type, :balls, :strikes, :outs
|
6
6
|
|
7
7
|
def initialize(data, **opts)
|
8
8
|
@response = data
|
@@ -217,7 +217,7 @@ module Sportradar
|
|
217
217
|
'oTT4' => 'Triple - Out at Home',
|
218
218
|
}
|
219
219
|
end
|
220
|
-
|
220
|
+
{"type"=>"steal", "id"=>"01ead210-1586-4d07-9713-6fd3d17b2b4c", "status"=>"official", "created_at"=>"2017-05-15T23:55:53+00:00", "pitcher"=>{"id"=>"9c12832b-c487-40d4-915b-e44097632d7c"}, "runners"=>[{"id"=>"65de4cd1-ca86-468c-9346-1e68d6279a8e", "starting_base"=>1, "ending_base"=>0, "outcome_id"=>"PO", "out"=>true, "last_name"=>"Gordon", "first_name"=>"Devaris", "preferred_name"=>"Dee", "jersey_number"=>"9", "description"=>"Dee Gordon picked off.", "fielders"=>[{"id"=>"bd519b9f-7539-4282-a741-3bd2bf532c40", "type"=>"putout", "sequence"=>1, "last_name"=>"Gurriel", "first_name"=>"Yulieski", "preferred_name"=>"Yulieski", "jersey_number"=>"10"}, {"id"=>"9c12832b-c487-40d4-915b-e44097632d7c", "type"=>"assist", "sequence"=>1, "last_name"=>"Musgrove", "first_name"=>"Joseph", "preferred_name"=>"Joe", "jersey_number"=>"59"}]}]}
|
221
221
|
end
|
222
222
|
end
|
223
223
|
end
|