Class: Football::Butler::ApiFootball::Players

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

Constant Summary collapse

PATH =
:players

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

PLAYER

id integer The id of the player

team integer The id of the team

league integer The id of the league

season integer 4 characters YYYY | Requires the fields Id, League or Team… The season of the league

search string >= 4 characters Requires the fields League or Team The name of the player

page integer Default: 1 Use for the pagination

players?id=id&season=season



39
40
41
42
# File 'lib/football/butler/api_football/players.rb', line 39

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