Skip to contents

Game header from the game sheet (/rencontre/{game_id}/): teams, score, start time, status, attendance and rink (one row). Staff birth dates are dropped from the sheet before it is returned.

Usage

magnus_game(game_id, return_parsed = TRUE)

Arguments

game_id

Game id (game_id of magnus_schedule()), e.g. 77779 (2026-27, shootout and MVPs); also sampled: 68838, 865.

return_parsed

Parse the payload into a tibble (default TRUE). Pass FALSE for the game sheet extracted from the page's embedded JSON, as a list.

Value

A tibble (return_parsed = TRUE; one row), else the game sheet list:

col_nametypedescription
game_idintegerGame id (integer join key).
competitioncharacterCompetition name as published.
phasecharacterPhase name in French.
roundintegerRound (journée) number.
game_datetimePOSIXctStart time, Europe/Paris.
statuscharacterGame state: final, in_progress or scheduled.
home_team_idintegerTeam id of the home team (integer).
home_teamcharacterDisplay name of the home team.
home_team_abbreviationcharacterAbbreviation of the home team.
away_team_idintegerTeam id of the away team (integer).
away_teamcharacterDisplay name of the away team.
away_team_abbreviationcharacterAbbreviation of the away team.
home_scoreintegerGoals of the home team (the final score, shootout included).
away_scoreintegerGoals of the away team (the final score, shootout included).
home_team_participant_idintegerTeam participant id of the home team in this phase (integer; joins the standings).
away_team_participant_idintegerTeam participant id of the away team in this phase (integer; joins the standings).
has_shootoutlogicalWhether the game went to a shootout.
n_periodsintegerNumber of regulation periods.
period_minutesintegerLength of a regulation period in minutes.
attendanceintegerNumber of spectators (attendance).
venuecharacterName of the rink (arena).

Examples

# \donttest{
  try(magnus_game(game_id = 77779))
#> Error in .euro_check_status(resp) : 
#>   liguemagnus.com/rencontre/77779/ answered HTTP 403: <html><body><h1>403
#> Forbidden</h1> Request forbidden by administrative rules. Interdiction
#> d'acceder a cette ressource </body></html>
# }