Skip to contents

Teams of a phase. team_id is stable across seasons and joins games and standings; competition_ids lists every competition the team entered (all seasons and levels).

Usage

magnus_teams(phase_id, return_parsed = TRUE)

Arguments

phase_id

Phase id (phase_id of magnus_phases()), e.g. 714. Required: without it the API answers every team of the federation (~680 KB).

return_parsed

Parse the payload into a tibble (default TRUE). Pass FALSE for the raw JSON envelope as a list.

Value

A tibble (return_parsed = TRUE), else the raw envelope list:

col_nametypedescription
team_idintegerTeam id (integer join key), stable across seasons; joins home_team_id / away_team_id of the schedule and team_id of the standings.
teamcharacterTeam display name (e.g., "Rapaces de Gap").
team_abbreviationcharacterTeam abbreviation (e.g., "GAP").
team_short_namecharacterShort team label (e.g., "GAP", "ANGLET").
team_labelcharacterBack-office label, "<club code> - <NAME> <level>"; use team for display.
gendercharacterGender of the team: M (men; the only value observed).
logo_urlcharacterURL of the team logo image.
club_idintegerId of the club (legal entity) behind the team (integer).
clubcharacterName of the club (legal entity).
club_codecharacterFederation club code (e.g., "93006S").
competition_idslistCompetition ids the team has entered, all seasons and levels (list of integer).

Examples

# \donttest{
  try(magnus_teams(phase_id = 714))
#> Error in .euro_check_status(resp) : 
#>   liguemagnus.com/wp-admin/admin-ajax.php answered HTTP 403:
#> <html><body><h1>403 Forbidden</h1> Request forbidden by administrative rules.
#> Interdiction d'acceder a cette ressource </body></html>
# }