Sha256: 8d65b6a045d0f1d352264b36aca455771fd12dba71b3fd2c0b6a0c4df2a58a77

Contents?: true

Size: 610 Bytes

Versions: 17

Compression:

Stored size: 610 Bytes

Contents

module Sportradar
  module Api
    module Odds
      class PlayerProp < Data
        attr_accessor :response, :api, :id


        def initialize(data, **opts)
          @response = data
          @api      = opts[:api]
          @id       = data.dig("player", "id")

          @markets_hash   = {}

          update(data, **opts)
        end

        def markets
          @markets_hash.values
        end

        def update(data, **opts)
          create_data(@markets_hash,   data['markets'],    klass: Market,  api: api, player: data['player'])  if data['markets']
        end

      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
sportradar-api-0.20.2 lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.20.1 lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.20.0 lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.20.0.pre2 lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.20.0.pre lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.19.6 lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.19.5 lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.19.4 lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.19.3 lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.19.2 lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.19.1 lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.19.0 lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.18.1 lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.18.0 lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.17.6 lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.17.5 lib/sportradar/api/odds/player_prop.rb
sportradar-api-0.17.5.pre lib/sportradar/api/odds/player_prop.rb