Class: Football::Butler::ApiFootball::Venues
- Inherits:
-
BaseApiFootball
- Object
- Base
- BaseApiFootball
- Football::Butler::ApiFootball::Venues
- Defined in:
- lib/football/butler/api_football/venues.rb
Constant Summary collapse
- PATH =
:venues
Constants inherited from Base
Class Method Summary collapse
-
.by_city(city:, result:, filters:) ⇒ Object
VENUES.
-
.by_country(country:, result:, filters:) ⇒ Object
/venues?country=country.
-
.by_id(id:, result:, filters:) ⇒ Object
/venues?id=id.
-
.by_name(name:, result:, filters:) ⇒ Object
/venues?name=name.
-
.search(search:, result:, filters:) ⇒ Object
/venues?search=Venues.search.
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_city(city:, result:, filters:) ⇒ Object
VENUES
id integer The id of the venue
name string The name of the venue
city string The city of the venue
country string The country name of the venue
search string >= 3 characters The name, city or the country of the venue
/venues?city=city
34 35 36 37 |
# File 'lib/football/butler/api_football/venues.rb', line 34 def by_city(city:, result:, filters:) filters.merge!({city: city}) Api.get(path: PATH, result: result, filters: filters) end |
.by_country(country:, result:, filters:) ⇒ Object
/venues?country=country
40 41 42 43 |
# File 'lib/football/butler/api_football/venues.rb', line 40 def by_country(country:, result:, filters:) filters.merge!({country: country}) Api.get(path: PATH, result: result, filters: filters) end |
.by_id(id:, result:, filters:) ⇒ Object
/venues?id=id
52 53 54 55 |
# File 'lib/football/butler/api_football/venues.rb', line 52 def by_id(id:, result:, filters:) filters.merge!({id: id}) Api.get(path: PATH, result: result, filters: filters) end |