Sha256: 5da633db37034112da9ee74b2b2393ffb9a9d83af55341c8f889b81ffd46cc74

Contents?: true

Size: 670 Bytes

Versions: 184

Compression:

Stored size: 670 Bytes

Contents

module Sportradar
  module Api
    module Basketball
      class FreeThrowMiss < ShotMiss
        def base_key
          "freethrow"
        end
        def display_type
          'FT Miss'
        end
        def free_throw_type
          @free_throw_type ||= @statistics.dig(base_key, "free_throw_type")
        end
        def made?
          false
        end
        def player_id
          stats = @statistics
          stats = stats[0] if stats.is_a?(Array)
          @player_id ||= stats&.dig("player", "id") # safe operator is specifically for lane violations, which have no player_id and should not be assigned a player
        end
      end
    end
  end
end

Version data entries

184 entries across 184 versions & 1 rubygems

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