class Football::Butler::FootballData::Teams
Constants
- PATH
Public Class Methods
by_competition(id:, result:, filters:)
click to toggle source
TEAMS
season={YEAR} stage={STAGE}
v2/competitions/{id}/teams
# File lib/football/butler/football_data/teams.rb, line 24 def by_competition(id:, result:, filters:) path = "#{Competitions::PATH}/#{id}/#{PATH}" Api.get(path: path, result: result, filters: filters) end
by_competition_and_year(id:, year:, result:, filters:)
click to toggle source
v2/competitions/{id}/teams?year={year}
# File lib/football/butler/football_data/teams.rb, line 30 def by_competition_and_year(id:, year:, result:, filters:) path = "#{Competitions::PATH}/#{id}/#{PATH}" filters.merge!({ year: year }) Api.get(path: path, result: result, filters: filters) end
by_id(id:)
click to toggle source
TEAM
v2/teams/{id} returns team object directly as a hash
# File lib/football/butler/football_data/teams.rb, line 13 def by_id(id:) path = "#{PATH}/#{id}" Api.get(path: path) end