Class: Football::Butler::Areas

Inherits:
Base
  • Object
show all
Defined in:
lib/football/butler/areas.rb

Direct Known Subclasses

Countries

Constant Summary

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

.all(result: api_switch_result) ⇒ Object

AREAS / COUNTRIES



17
18
19
# File 'lib/football/butler/areas.rb', line 17

def all(result: api_switch_result)
  api_switch_method(__method__, { result: result })
end

.by_code(code:, result: api_switch_result, filters: {}) ⇒ Object



26
27
28
# File 'lib/football/butler/areas.rb', line 26

def by_code(code:, result: api_switch_result, filters: {})
  api_switch_method(__method__, { code: code, result: result, filters: filters })
end

.by_id(id:) ⇒ Object

AREA / COUNTRY



12
13
14
# File 'lib/football/butler/areas.rb', line 12

def by_id(id:)
  api_switch_method(__method__, { id: id })
end

.by_name(name:, result: api_switch_result, filters: {}) ⇒ Object

ADDITIONAL



22
23
24
# File 'lib/football/butler/areas.rb', line 22

def by_name(name:, result: api_switch_result, filters: {})
  api_switch_method(__method__, { name: name, result: result, filters: filters })
end

.search_by_name(name:, result: api_switch_result, filters: {}) ⇒ Object



30
31
32
# File 'lib/football/butler/areas.rb', line 30

def search_by_name(name:, result: api_switch_result, filters: {})
  api_switch_method(__method__, { name: name, result: result, filters: filters })
end