Class: Football::Butler::ApiFootball::HeadToHead
- Defined in:
- lib/football/butler/api_football/head_to_head.rb
Constant Summary collapse
- PATH =
'fixtures/headtohead'
Constants inherited from Base
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_teams(team_id:, second_team_id:, filters:, result:) ⇒ Object
HEAD TO HEAD
h2h required stringID-ID The ids of the teams
date stringYYYY-MM-DD league integer The id of the league
season integer 4 characters YYYY The season of the league
last integer For the X last fixtures
next integer For the X next fixtures
from stringYYYY-MM-DD to stringYYYY-MM-DD status string The status short of the fixture
timezone string A valid timezone from the endpoint Timezone
fixtures/headtohead?h2h=team_id-second_team_id
48 49 50 51 |
# File 'lib/football/butler/api_football/head_to_head.rb', line 48 def by_teams(team_id:, second_team_id:, filters:, result:) filters.merge!(h2h: "#{team_id}-#{second_team_id}") Api.get(path: PATH, filters: filters, result: result) end |