Class: Football::Butler::ApiFootball::Odds

Inherits:
BaseApiFootball show all
Defined in:
lib/football/butler/api_football/odds.rb

Constant Summary collapse

PATH =
:odds

Constants inherited from Base

Base::MSG_INVALID_CONFIG

Class Method Summary collapse

Methods inherited from Base

api_class, api_switch, api_switch_method, api_switch_result, error_message, invalid_config_result, not_found_result, reached_limit?, this_class, unsupported_api_call, unsupported_api_endpoint

Class Method Details

.by_match(id:, from:, to:, result:) ⇒ Object

ODDS

fixture integer The id of the fixture

league integer The id of the league

season integer 4 characters YYYY The season of the league

date stringYYYY-MM-DD A valid date

timezone string A valid timezone from the endpoint Timezone

page integer Default: 1 Use for the pagination

bookmaker integer The id of the bookmaker

bet integer The id of the bet

odds&match_id=id&from=from&to=to



47
48
49
50
# File 'lib/football/butler/api_football/odds.rb', line 47

def by_match(id:, from:, to:, result:)
  filters = { fixture: id }
  Api.get(path: PATH, filters: filters, result: result)
end