Class: Football::Butler::ApiFootball::Coachs
- Inherits:
-
BaseApiFootball
- Object
- Base
- BaseApiFootball
- Football::Butler::ApiFootball::Coachs
- Defined in:
- lib/football/butler/api_football/coachs.rb
Constant Summary collapse
- PATH =
:coachs
Constants inherited from Base
Class Method Summary collapse
-
.by_id(id:, result:, filters:) ⇒ Object
COACHS.
-
.by_team(team:, result:, filters:) ⇒ Object
/coachs?team=team.
-
.search_by_name(name:, result:, filters:) ⇒ Object
/coachs?search=name.
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(id:, result:, filters:) ⇒ Object
COACHS
id integer The id of the coach
team integer The id of the team
search string >= 3 characters The name of the coach
/coachs?id=id
26 27 28 29 |
# File 'lib/football/butler/api_football/coachs.rb', line 26 def by_id(id:, result:, filters:) filters.merge!({ id: id }) Api.get(path: PATH, result: result, filters: filters) end |