Class: Football::Butler::Apifootball::Odds

Inherits:
BaseApifootball show all
Defined in:
lib/football/butler/apifootball/odds.rb

Constant Summary collapse

PATH =
:get_odds

Constants inherited from Base

Base::MSG_INVALID_CONFIG

Class Method Summary collapse

Methods inherited from BaseApifootball

build_path

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

from Start date (yyyy-mm-dd) to Stop date (yyyy-mm-dd)

action=get_odds&match_id=id&from=from&to=to



17
18
19
20
# File 'lib/football/butler/apifootball/odds.rb', line 17

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