Skip to content

Commit 014da12

Browse files
committed
Add a note on how this was accomplished for next year
1 parent c11b4ab commit 014da12

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

src/app/conf/2025/_videos.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
/**
2+
* This was populated with data captured via:
3+
*
4+
* https://developers.google.com/youtube/v3/docs/playlistItems/list
5+
*
6+
* with:
7+
*
8+
* - part: snippet
9+
* - maxResults: 50
10+
* - playlistId: UUIVbABX6aSk5hy5UPAhQdmQ
11+
*
12+
* And then also adding `pageToken` for the second request to get the second
13+
* page.
14+
*
15+
* Note that the playlistId is the ID of the "Uploads" playlist for the
16+
* "GraphQLFoundationTalks" channel.
17+
*
18+
* Since the videos are unlisted it needed to be authenticated with the
19+
* https://www.googleapis.com/auth/youtube.readonly scope. This is also
20+
* why we couldn't use the generate-videos-mappings.py script.
21+
*
22+
* Then we simply mapped over the results:
23+
*
24+
* ```js
25+
* for (const item of data.items) {
26+
* const id = item.snippet.resourceId.videoId;
27+
* const title = item.snippet.title
28+
* videos.push({ id, title })
29+
* }
30+
* ```
31+
*/
132
export const videos: {
233
id: string
334
title: string

0 commit comments

Comments
 (0)