lib/sportradar/api/baseball/events/warming_up.rb in sportradar-api-0.10.33 vs lib/sportradar/api/baseball/events/warming_up.rb in sportradar-api-0.10.34

- old
+ new

@@ -1,20 +1,22 @@ module Sportradar module Api module Baseball class Event class WarmingUp < Data - attr_accessor :response, :id, :hitter_id, :outcome, :description + attr_accessor :response, :id, :first_name, :last_name, :player_id def initialize(data, **opts) - @response = data + @response = data # @api = opts[:api] # @half_inning = opts[:half_inning] - @event = opts[:event] - - @id = data["id"] - @type = data['type'] - + @event = opts[:event] + @id = data["id"] + @type = data['type'] + @first_name = data['first_name'] if data['first_name'] + @last_name = data['last_name'] if data['last_name'] + @player_id = data['player_id'] if data['player_id'] + @preferred_name = data['preferred_name'] if data['preferred_name'] update(data) end def update(data, **opts) # parse pitches