Sha256: 256c0800873d4717a64db22d4f1b8070f3b2e66e21d5ed0a5e38070100b4d38e

Contents?: true

Size: 693 Bytes

Versions: 258

Compression:

Stored size: 693 Bytes

Contents

module Sportradar
  module Api
    class Odds < Request
      attr_accessor :access_level

      def initialize( access_level = 't')
        raise Sportradar::Api::Error::InvalidAccessLevel unless allowed_access_levels.include? access_level
        @access_level = access_level
      end

      def odds
        get request_url, {format: 'none'}
      end
      private

      def request_url(path = nil)
        "/odds-#{access_level}#{version}"
      end

      def api_key
        Sportradar::Api.api_key_params("odds")
      end

      def version
        Sportradar::Api.version('odds')
      end

      def allowed_access_levels
        ['p', 's', 'b', 't']
      end

    end
  end
end

Version data entries

258 entries across 258 versions & 1 rubygems

Version Path
sportradar-api-0.17.4 lib/sportradar/api/odds.rb
sportradar-api-0.17.3 lib/sportradar/api/odds.rb
sportradar-api-0.17.2 lib/sportradar/api/odds.rb
sportradar-api-0.17.1 lib/sportradar/api/odds.rb
sportradar-api-0.17.0 lib/sportradar/api/odds.rb
sportradar-api-0.17.0.pre lib/sportradar/api/odds.rb
sportradar-api-0.16.1 lib/sportradar/api/odds.rb
sportradar-api-0.16.0 lib/sportradar/api/odds.rb
sportradar-api-0.15.1 lib/sportradar/api/odds.rb
sportradar-api-0.15.0 lib/sportradar/api/odds.rb
sportradar-api-0.14.0 lib/sportradar/api/odds.rb
sportradar-api-0.13.26 lib/sportradar/api/odds.rb
sportradar-api-0.13.25 lib/sportradar/api/odds.rb
sportradar-api-0.13.24 lib/sportradar/api/odds.rb
sportradar-api-0.13.23 lib/sportradar/api/odds.rb
sportradar-api-0.13.22 lib/sportradar/api/odds.rb
sportradar-api-0.13.21 lib/sportradar/api/odds.rb
sportradar-api-0.13.20 lib/sportradar/api/odds.rb
sportradar-api-0.13.19 lib/sportradar/api/odds.rb
sportradar-api-0.13.18 lib/sportradar/api/odds.rb