Module: Sports::Butler::Shared::ApiComs

Included in:
Endpoints
Defined in:
lib/sports/butler/shared/api_coms.rb

Instance Method Summary collapse

Instance Method Details

#cups(filters: {}) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/sports/butler/shared/api_coms.rb', line 14

def cups(filters: {})
  return error_missing_endpoint_method(__method__) unless available_endpoint_methods.include?(__method__)

  filters.merge!({ type: 'cup' })
  api.get(path: build_path(path), filters: filters)
  api
end

#leagues(filters: {}) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/sports/butler/shared/api_coms.rb', line 6

def leagues(filters: {})
  return error_missing_endpoint_method(__method__) unless available_endpoint_methods.include?(__method__)

  filters.merge!({ type: 'league' })
  api.get(path: build_path(path), filters: filters)
  api
end