Skip to contents

Every competition edition (season) the API knows, one row per edition.

One row per competition and edition: edition_id (START year - 1935), season_start_year and season (END year), plus how many rounds and weeks the edition lists. competition_name is the API's name for the competition (the Liga is Liga Nacional here).

Endpoint: GET https://api2.acb.com/api/matchdata/Menu/competition-data

Usage

acb_competition_editions(competition_ids = NULL)

Arguments

competition_ids

(default NULL) Competition id (1, 2, 3, 10) or a list of ids for several. Omitted = the API's default competition. One or more whole numbers (a vector repeats competitionIds in the query).

Value

A hoopR_data tibble, one row per record described above; the columns are always these, in this order (sportsdataverse-py acb_competition_editions):

col_nametypedescription
competition_idintegerCompetition id: 1 Liga Endesa, 2 Copa del Rey, 3 Supercopa Endesa, 10 Minicopa Endesa.
competition_namecharacterThe API's competition name ('Liga Nacional' for the Liga).
edition_idintegerSeason id (START year - 1935).
season_start_yearintegerCalendar year the season starts (2026 for 2026-27).
seasonintegerSeason END year (2027 for 2026-27) = seasonEndYear.
n_roundsintegerRounds the edition lists.
n_weeksintegerWeeks the edition lists.

Details

Source, terms of use, request pacing, seasons, ids, coverage and error classes of this family: see the notes in acb_match_header().

Examples

# \donttest{
  try(acb_competition_editions())
#> Error in acb_competition_editions() : 
#>   api2.acb.com/api/matchdata/Menu/competition-data: the answer holds no
#> rows (competitions is empty).
# }