Sha256: 7a7ebe68bc3be1209e1936121a5adc1b70026484cd417b6ec1e11418a932a1e8

Contents?: true

Size: 1.16 KB

Versions: 77

Compression:

Stored size: 1.16 KB

Contents

module Sportradar
  module Api
    module Baseball
      class Event
        class WarmingUp < Data
          attr_accessor :response, :id, :first_name, :last_name, :player_id, :team_id

          def initialize(data, **opts)
            @response       = data
            # @api          = opts[:api]
            # @half_inning  = opts[:half_inning]
            @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']
            @team_id        = data['team_id'] if data['team_id']
            @preferred_name = data['preferred_name'] if data['preferred_name']
            update(data)
          end

          def description
            "#{(@preferred_name || @first_name)} #{@last_name} is now warming up in the bullpen."
          end

          def update(data, **opts)
            # parse pitches
          end

          def data_key
            'warming_up'
          end

        end
      end
    end
  end
end

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
sportradar-api-0.20.2 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.20.1 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.20.0 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.20.0.pre2 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.20.0.pre lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.19.6 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.19.5 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.19.4 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.19.3 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.19.2 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.19.1 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.19.0 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.18.1 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.18.0 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.17.6 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.17.5 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.17.5.pre lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.17.4 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.17.3 lib/sportradar/api/baseball/events/warming_up.rb
sportradar-api-0.17.2 lib/sportradar/api/baseball/events/warming_up.rb