Class: Football::Butler::Competitions
- Inherits:
-
Base
- Object
- Base
- Football::Butler::Competitions
show all
- Defined in:
- lib/football/butler/competitions.rb
Constant Summary
Constants inherited
from Base
Base::MSG_INVALID_CONFIG
Class Method Summary
collapse
-
.all(result: api_switch_result, filters: {}) ⇒ Object
-
.all_cups(result: api_switch_result, filters: {}) ⇒ Object
-
.all_leagues(result: api_switch_result, filters: {}) ⇒ Object
-
.all_seasons(result: api_switch_result) ⇒ Object
-
.all_tier_plan_filter(result: api_switch_result, filters: {}) ⇒ Object
-
.by_areas(ids:, result: api_switch_result, filters: {}) ⇒ Object
-
.by_country(id:, result: api_switch_result) ⇒ Object
-
.by_country_name(name:, result: api_switch_result) ⇒ Object
-
.by_id(id:) ⇒ Object
-
.by_plan(plan:, result: api_switch_result, filters: {}) ⇒ Object
-
.current_match_day(id:) ⇒ Object
-
.search_by_name(name:, result: api_switch_result, filters: {}) ⇒ Object
-
.seasons(id:) ⇒ Object
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, filters: {}) ⇒ Object
25
26
27
|
# File 'lib/football/butler/competitions.rb', line 25
def all(result: api_switch_result, filters: {})
api_switch_method(__method__, { result: result, filters: filters })
end
|
.all_cups(result: api_switch_result, filters: {}) ⇒ Object
64
65
66
|
# File 'lib/football/butler/competitions.rb', line 64
def all_cups(result: api_switch_result, filters: {})
api_switch_method(__method__, { result: result, filters: filters })
end
|
.all_leagues(result: api_switch_result, filters: {}) ⇒ Object
59
60
61
|
# File 'lib/football/butler/competitions.rb', line 59
def all_leagues(result: api_switch_result, filters: {})
api_switch_method(__method__, { result: result, filters: filters })
end
|
.all_seasons(result: api_switch_result) ⇒ Object
51
52
53
|
# File 'lib/football/butler/competitions.rb', line 51
def all_seasons(result: api_switch_result)
api_switch_method(__method__, { result: result })
end
|
.all_tier_plan_filter(result: api_switch_result, filters: {}) ⇒ Object
29
30
31
32
|
# File 'lib/football/butler/competitions.rb', line 29
def all_tier_plan_filter(result: api_switch_result, filters: {})
filters.merge!(Configuration.tier_plan_filter)
api_switch_method(__method__, { result: result, filters: filters })
end
|
.by_areas(ids:, result: api_switch_result, filters: {}) ⇒ Object
38
39
40
|
# File 'lib/football/butler/competitions.rb', line 38
def by_areas(ids:, result: api_switch_result, filters: {})
api_switch_method(__method__, { ids: ids, result: result, filters: filters })
end
|
.by_country(id:, result: api_switch_result) ⇒ Object
16
17
18
|
# File 'lib/football/butler/competitions.rb', line 16
def by_country(id:, result: api_switch_result)
api_switch_method(__method__, { id: id, result: result })
end
|
.by_country_name(name:, result: api_switch_result) ⇒ Object
20
21
22
|
# File 'lib/football/butler/competitions.rb', line 20
def by_country_name(name:, result: api_switch_result)
api_switch_method(__method__, { name: name, result: result })
end
|
.by_id(id:) ⇒ Object
12
13
14
|
# File 'lib/football/butler/competitions.rb', line 12
def by_id(id:)
api_switch_method(__method__, { id: id })
end
|
.by_plan(plan:, result: api_switch_result, filters: {}) ⇒ Object
34
35
36
|
# File 'lib/football/butler/competitions.rb', line 34
def by_plan(plan:, result: api_switch_result, filters: {})
api_switch_method(__method__, { plan: plan, result: result, filters: filters })
end
|
.current_match_day(id:) ⇒ Object
43
44
45
|
# File 'lib/football/butler/competitions.rb', line 43
def current_match_day(id:)
api_switch_method(__method__, { id: id })
end
|
.search_by_name(name:, result: api_switch_result, filters: {}) ⇒ Object
55
56
57
|
# File 'lib/football/butler/competitions.rb', line 55
def search_by_name(name:, result: api_switch_result, filters: {})
api_switch_method(__method__, { name: name, result: result, filters: filters })
end
|
.seasons(id:) ⇒ Object
47
48
49
|
# File 'lib/football/butler/competitions.rb', line 47
def seasons(id:)
api_switch_method(__method__, { id: id })
end
|