class Football::Butler::ApiFootball::Teams
Constants
- PATH
Public Class Methods
by_competition_and_year(id:, year:, result:, filters:)
click to toggle source
TEAMS
id integer The id of the team
name string The name of the team
league integer The id of the league
season integer 4 characters YYYY The season of the league
country string The country name of the team
search string >= 3 characters The name or the country name of the team
/teams?league={id}&season={year}
# File lib/football/butler/api_football/teams.rb, line 58 def by_competition_and_year(id:, year:, result:, filters:) filters.merge!({ league: id, season: year }) Api.get(path: PATH, result: result, filters: filters) end
by_country_name(name:)
click to toggle source
/teams/country={country}
# File lib/football/butler/api_football/teams.rb, line 26 def by_country_name(name:) filters = { country: name } Api.get(path: PATH, filters: filters) end
by_id(id:)
click to toggle source
TEAM
/teams/id={id}
# File lib/football/butler/api_football/teams.rb, line 14 def by_id(id:) filters = { id: id } Api.get(path: PATH, filters: filters) end
by_name(name:)
click to toggle source
/teams/id={id}
# File lib/football/butler/api_football/teams.rb, line 20 def by_name(name:) filters = { name: name } Api.get(path: PATH, filters: filters) end