From 47772c01b17b8740b3c2ba9bde02486f51d35a78 Mon Sep 17 00:00:00 2001 From: Andy Diamondstein Date: Mon, 28 Nov 2016 15:27:34 -0500 Subject: [PATCH] Move title, method names to main function comments --- apps-script/youtube.gs | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/apps-script/youtube.gs b/apps-script/youtube.gs index 8130706f..cf812534 100644 --- a/apps-script/youtube.gs +++ b/apps-script/youtube.gs @@ -1,7 +1,6 @@ -// TITLE: Search by keyword -// DESCRIPTION: use_function_comment -// API_METHOD: youtube.search.list /** + * Title: Search by keyword + * Method: youtube.search.list * This function searches for videos related to the keyword 'dogs'. The video IDs and titles * of the search results are logged to Apps Script's log. * @@ -19,10 +18,9 @@ function searchByKeyword() { } -// TITLE: Retrieve my uploads -// DESCRIPTION: use_function_comment -// API_METHOD: youtube.channels.list /** + * Title: Retrieve my uploads + * Method: youtube.channels.list * This function retrieves the current script user's uploaded videos. To execute, * it requires the OAuth read/write scope for YouTube as well as user authorization. * In Apps Script's runtime environment, the first time a user runs a script, Apps @@ -71,10 +69,9 @@ function retrieveMyUploads() { } } -// TITLE: Update video -// DESCRIPTION: use_function_comment -// API_METHOD: youtube.videos.update /** + * Title: Update video + * Method: youtube.videos.update * This sample finds the active user's uploads, then updates the most recent * upload's description by appending a string. */ @@ -111,10 +108,9 @@ function updateVideo() { } } -// TITLE: Subscribe to channel -// DESCRIPTION: use_function_comment -// API_METHOD: youtube.subscriptions.insert /** + * Title: Subscribe to channel + * Method: youtube.subscriptions.insert * This sample subscribes the active user to the GoogleDevelopers * YouTube channel, specified by the channelId. */ @@ -143,10 +139,9 @@ function addSubscription() { } } -// TITLE: Post channel bulletin -// DESCRIPTION: use_function_comment -// API_METHOD: youtube.activities.insert /** + * Title: Post channel bulletin + * Method: youtube.activities.insert * This function creates and posts a new channel bulletin, adding a video and message. Note that this * will also accept a playlist ID. After completing the API call, logs the output to the log. */ @@ -172,10 +167,9 @@ function postChannelBulletin() { Logger.log(response); } -// TITLE: Export YouTube Analytics data to Google Sheets -// DESCRIPTION: use_function_comment -// API_METHOD: youtubeAnalytics.reports.query /** + * Title: Export YouTube Analytics data to Google Sheets + * Method: youtubeAnalytics.reports.query * This function uses the YouTube Analytics API to fetch data about the * authenticated user's channel, creating a new Google Sheet in the user's Drive * with the data.