Class: SportsApi::Football::OddsResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/sports_api/football/resources/odds_pre_match/odds.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#get_request, #initialize

Constructor Details

This class inherits a constructor from SportsApi::Resource

Instance Method Details

#list(**params) ⇒ Object

Arguments: fixture: [Integer](optional) - The fixture ID. league: [Integer](optional) - The league ID. bet: [Integer](optional) - The bet ID. bookmaker: [Integer](optional) - The bookmaker ID. season: [Integer](optional) - The season of the league (= YYYY). date: [String](optional) - A valid date (= YYYY-MM-DD). timezone: [String](optional) - A valid timezone from the endpoint Timezone. page: [Integer](optional) - Use for the pagination (default 1).



15
16
17
18
# File 'lib/sports_api/football/resources/odds_pre_match/odds.rb', line 15

def list(**params)
  response = get_request('odds', params:)
  Collection.from_response(response, type: SportsApi::Football::Odds)
end