Sha256: 46f69ecbf5430b77bafdd4073e72a688852657a9a3071b256a82b88998283ff7

Contents?: true

Size: 822 Bytes

Versions: 3

Compression:

Stored size: 822 Bytes

Contents

module Sportradar
  module Api
    module Football
      class Nfl
        class Play < Sportradar::Api::Football::Play

          def play?
            @event_type.nil?
          end

          def down
            start_situation.down
          end

          def yfd
            start_situation.yfd
          end
          # def parse_player
          #   # TODO: Currently there is an issue where we are only mapping one player_id to a play, but there are plays with multiple players involved.
          #   play_stats = @statistics.penalty || @statistics.rush || @statistics.return || @statistics.receive
          #   if play_stats.is_a?(Array)
          #     play_stats = play_stats.first
          #   end
          #   @player_id = play_stats&.player&.id
          # end

        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sportradar-api-0.11.50 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.11.49 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.11.48 lib/sportradar/api/football/nfl/play.rb