1- // TITLE: Search by keyword
2- // DESCRIPTION: use_function_comment
3- // API_METHOD: youtube.search.list
41/**
2+ * Title: Search by keyword
3+ * Method: youtube.search.list
54 * This function searches for videos related to the keyword 'dogs'. The video IDs and titles
65 * of the search results are logged to Apps Script's log.
76 *
@@ -19,10 +18,9 @@ function searchByKeyword() {
1918}
2019
2120
22- // TITLE: Retrieve my uploads
23- // DESCRIPTION: use_function_comment
24- // API_METHOD: youtube.channels.list
2521/**
22+ * Title: Retrieve my uploads
23+ * Method: youtube.channels.list
2624 * This function retrieves the current script user's uploaded videos. To execute,
2725 * it requires the OAuth read/write scope for YouTube as well as user authorization.
2826 * In Apps Script's runtime environment, the first time a user runs a script, Apps
@@ -71,10 +69,9 @@ function retrieveMyUploads() {
7169 }
7270}
7371
74- // TITLE: Update video
75- // DESCRIPTION: use_function_comment
76- // API_METHOD: youtube.videos.update
7772/**
73+ * Title: Update video
74+ * Method: youtube.videos.update
7875 * This sample finds the active user's uploads, then updates the most recent
7976 * upload's description by appending a string.
8077 */
@@ -111,10 +108,9 @@ function updateVideo() {
111108 }
112109}
113110
114- // TITLE: Subscribe to channel
115- // DESCRIPTION: use_function_comment
116- // API_METHOD: youtube.subscriptions.insert
117111/**
112+ * Title: Subscribe to channel
113+ * Method: youtube.subscriptions.insert
118114 * This sample subscribes the active user to the GoogleDevelopers
119115 * YouTube channel, specified by the channelId.
120116 */
@@ -143,10 +139,9 @@ function addSubscription() {
143139 }
144140}
145141
146- // TITLE: Post channel bulletin
147- // DESCRIPTION: use_function_comment
148- // API_METHOD: youtube.activities.insert
149142/**
143+ * Title: Post channel bulletin
144+ * Method: youtube.activities.insert
150145 * This function creates and posts a new channel bulletin, adding a video and message. Note that this
151146 * will also accept a playlist ID. After completing the API call, logs the output to the log.
152147 */
@@ -172,10 +167,9 @@ function postChannelBulletin() {
172167 Logger . log ( response ) ;
173168}
174169
175- // TITLE: Export YouTube Analytics data to Google Sheets
176- // DESCRIPTION: use_function_comment
177- // API_METHOD: youtubeAnalytics.reports.query
178170/**
171+ * Title: Export YouTube Analytics data to Google Sheets
172+ * Method: youtubeAnalytics.reports.query
179173 * This function uses the YouTube Analytics API to fetch data about the
180174 * authenticated user's channel, creating a new Google Sheet in the user's Drive
181175 * with the data.
0 commit comments