For many years, GDQ's schedule was a server-side rendered HTML page with progressive JS enhancement, and this project parsed that HTML to generate an iCalendar file.
Now, right when AGDQ 2024 started, the schedule page switched to a client-side rendered JS webapp based on a JSON API. The two schedule pages are 0% compatible with each other. This project is currently returning an empty calendar because it can't find the HTML elements it expects.
In order to make this project work with the new JSON API, it needs to be almost completely rewritten.
Details
Get the event ID. AGDQ 2024 has ID 46.
Send an HTTP HEAD request to https://gamesdonequick.com/schedule
Inspect the 302 response's Location header, which will contain a URL with the event ID in a path parameter, and will be in the form https://gamesdonequick.com/schedule/46.
Send an HTTP GET request to https://gamesdonequick.com/tracker/api/v2/events/{id}/runs/
It's not clear how pagination works, because the response object contains null values for both the previous and next properties (with count equal to 140) for AGDQ 2024.
Extract the required properties from each object in the results array in order to construct GameRun instances.
start - starttime, which is a zoned ISO 8601 datetime
duration - endtime-starttime, subtract two zoned ISO 8601 datetimes to get the TimeSpan. Don't use runtime because that gets mutated after a run finishes to be the actual duration, instead of the expected duration.
name - either name or display_name, which both seem to always contain the same value
description - category + " — " + console; don't use the description property, which is always the empty string in AGDQ 2024
runners - runners[*].name
host - hosts[0].name; previously there were either 0 or 1 hosts for each run, but in AGDQ 2024 there is one run (The Legend of Zelda: Majora's Mask) with two hosts (brutal_melo and cartridgeblowers), which I think is a mistake because there are 0 commentators for that run
setupDuration - setuptime which is an ISO 8601 duration (h:mm:ss), or it can be 0. Not used for anything and probably safe to remove, unless we want to add it to the starttime in an attempt to make the event start when the run starts, not when the waiting screen appears.
The new JSON document includes the commentators for the first time, so we could add them too. commentators[*].name
For many years, GDQ's schedule was a server-side rendered HTML page with progressive JS enhancement, and this project parsed that HTML to generate an iCalendar file.
Now, right when AGDQ 2024 started, the schedule page switched to a client-side rendered JS webapp based on a JSON API. The two schedule pages are 0% compatible with each other. This project is currently returning an empty calendar because it can't find the HTML elements it expects.
In order to make this project work with the new JSON API, it needs to be almost completely rewritten.
Details
46
.https://gamesdonequick.com/schedule
Location
header, which will contain a URL with the event ID in a path parameter, and will be in the formhttps://gamesdonequick.com/schedule/46
.https://gamesdonequick.com/tracker/api/v2/events/{id}/runs/
null
values for both theprevious
andnext
properties (withcount
equal to140
) for AGDQ 2024.results
array in order to constructGameRun
instances.start
-starttime
, which is a zoned ISO 8601 datetimeduration
-endtime-starttime
, subtract two zoned ISO 8601 datetimes to get theTimeSpan
. Don't useruntime
because that gets mutated after a run finishes to be the actual duration, instead of the expected duration.name
- eithername
ordisplay_name
, which both seem to always contain the same valuedescription
-category + " — " + console
; don't use thedescription
property, which is always the empty string in AGDQ 2024runners
-runners[*].name
host
-hosts[0].name
; previously there were either 0 or 1 hosts for each run, but in AGDQ 2024 there is one run (The Legend of Zelda: Majora's Mask) with two hosts (brutal_melo and cartridgeblowers), which I think is a mistake because there are 0 commentators for that runsetupDuration
-setuptime
which is an ISO 8601 duration (h:mm:ss
), or it can be0
. Not used for anything and probably safe to remove, unless we want to add it to thestarttime
in an attempt to make the event start when the run starts, not when the waiting screen appears.commentators[*].name