Class: Football::Butler::ApiFootball::Standings

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

Constant Summary collapse

PATH =
:standings

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_competition_and_year(id:, year:, result:, filters:) ⇒ Object

STANDINGS

league integer The id of the league

season required integer 4 characters YYYY The season of the league

team integer The id of the team

/standings?league=id&season=year



27
28
29
30
# File 'lib/football/butler/api_football/standings.rb', line 27

def by_competition_and_year(id:, year:, result:, filters:)
  filters.merge!({ league: id, season: year })
  Api.get(path: PATH, filters: filters, result: result)
end