Skip to content

Commit a43e08c

Browse files
committed
Update Advanced Services region tags to include apps_script prefix
1 parent 29e2ab6 commit a43e08c

24 files changed

+162
-164
lines changed

advanced/adminSDK.gs

+24-24
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
// [START listAllUsers]
16+
// [START apps_script_admin_sdk_list_all_users]
1717
/**
1818
* Lists all the users in a domain sorted by first name.
1919
*/
@@ -39,9 +39,9 @@ function listAllUsers() {
3939
pageToken = page.nextPageToken;
4040
} while (pageToken);
4141
}
42-
// [END listAllUsers]
42+
// [END apps_script_admin_sdk_list_all_users]
4343

44-
// [START getUser]
44+
// [START apps_script_admin_sdk_get_users]
4545
/**
4646
* Get a user by their email address and logs all of their data as a JSON string.
4747
*/
@@ -50,9 +50,9 @@ function getUser() {
5050
var user = AdminDirectory.Users.get(userEmail);
5151
Logger.log('User data:\n %s', JSON.stringify(user, null, 2));
5252
}
53-
// [END getUser]
53+
// [END apps_script_admin_sdk_get_users]
5454

55-
// [START addUser]
55+
// [START apps_script_admin_sdk_get_users]
5656
/**
5757
* Adds a new user to the domain, including only the required information. For
5858
* the full list of user fields, see the API's reference documentation:
@@ -71,9 +71,9 @@ function addUser() {
7171
user = AdminDirectory.Users.insert(user);
7272
Logger.log('User %s created with ID %s.', user.primaryEmail, user.id);
7373
}
74-
// [END addUser]
74+
// [END apps_script_admin_sdk_get_users]
7575

76-
// [START createAlias]
76+
// [START apps_script_admin_sdk_create_alias]
7777
/**
7878
* Creates an alias (nickname) for a user.
7979
*/
@@ -85,9 +85,9 @@ function createAlias() {
8585
alias = AdminDirectory.Users.Aliases.insert(alias, userEmail);
8686
Logger.log('Created alias %s for user %s.', alias.alias, userEmail);
8787
}
88-
// [END createAlias]
88+
// [END apps_script_admin_sdk_create_alias]
8989

90-
// [START listAllGroups]
90+
// [START apps_script_admin_sdk_list_all_groups]
9191
/**
9292
* Lists all the groups in the domain.
9393
*/
@@ -112,9 +112,9 @@ function listAllGroups() {
112112
pageToken = page.nextPageToken;
113113
} while (pageToken);
114114
}
115-
// [END listAllGroups]
115+
// [END apps_script_admin_sdk_list_all_groups]
116116

117-
// [START addGroupMember]
117+
// [START apps_script_admin_sdk_add_group_member]
118118
/**
119119
* Adds a user to an existing group in the domain.
120120
*/
@@ -128,9 +128,9 @@ function addGroupMember() {
128128
member = AdminDirectory.Members.insert(member, groupEmail);
129129
Logger.log('User %s added as a member of group %s.', userEmail, groupEmail);
130130
}
131-
// [END addGroupMember]
131+
// [END apps_script_admin_sdk_add_group_member]
132132

133-
// [START migrate]
133+
// [START apps_script_admin_sdk_migrate]
134134
/**
135135
* Gets three RFC822 formatted messages from the each of the latest three
136136
* threads in the user's Gmail inbox, creates a blob from the email content
@@ -168,9 +168,9 @@ function getRecentMessagesContent() {
168168
}
169169
return messagesContent;
170170
}
171-
// [END migrate]
171+
// [END apps_script_admin_sdk_migrate]
172172

173-
// [START getGroupSettings]
173+
// [START apps_script_admin_sdk_get_group_setting]
174174
/**
175175
* Gets a group's settings and logs them to the console.
176176
*/
@@ -179,7 +179,7 @@ function getGroupSettings() {
179179
var group = AdminGroupsSettings.Groups.get(groupId);
180180
Logger.log(JSON.stringify(group, null, 2));
181181
}
182-
// [END getGroupSettings]
182+
// [END apps_script_admin_sdk_get_group_setting]
183183

184184
// [START updateGroupSettings]
185185
/**
@@ -194,7 +194,7 @@ function updateGroupSettings() {
194194
}
195195
// [END updateGroupSettings]
196196

197-
// [START getLicenseAssignments]
197+
// [START apps_script_admin_sdk_get_license_assignments]
198198
/**
199199
* Logs the license assignments, including the product ID and the sku ID, for
200200
* the users in the domain. Notice the use of page tokens to access the full
@@ -218,7 +218,7 @@ function getLicenseAssignments() {
218218
assignment.userId, assignment.productId, assignment.skuId);
219219
}
220220
}
221-
// [END getLicenseAssignments]
221+
// [END apps_script_admin_sdk_get_license_assignments]
222222

223223
// [START insertLicenseAssignment]
224224
/**
@@ -235,7 +235,7 @@ function insertLicenseAssignment() {
235235
}
236236
// [END insertLicenseAssignment]
237237

238-
// [START generateLoginActivityReport]
238+
// [START apps_script_admin_sdk_generate_login_activity_report]
239239
/**
240240
* Generates a login activity report for the last week as a spreadsheet. The
241241
* report includes the time, user, and login result.
@@ -287,9 +287,9 @@ function generateLoginActivityReport() {
287287
Logger.log('No results returned.');
288288
}
289289
}
290-
// [END generateLoginActivityReport]
290+
// [END apps_script_admin_sdk_generate_login_activity_report]
291291

292-
// [START generateUserUsageReport]
292+
// [START apps_script_admin_sdk_generate_user_usage_report]
293293
/**
294294
* Generates a user usage report for this day last week as a spreadsheet. The
295295
* report includes the date, user, last login time, number of emails received,
@@ -373,9 +373,9 @@ function getParameterValues(parameters) {
373373
return result;
374374
}, {});
375375
}
376-
// [END generateUserUsageReport]
376+
// [END apps_script_admin_sdk_generate_user_usage_report]
377377

378-
// [START getSubscriptions]
378+
// [START apps_script_admin_sdk_get_subscriptions]
379379
/**
380380
* Logs the list of subscriptions, including the customer ID, date created, plan
381381
* name, and the sku ID. Notice the use of page tokens to access the full list
@@ -400,4 +400,4 @@ function getSubscriptions() {
400400
pageToken = result.nextPageToken;
401401
} while (pageToken);
402402
}
403-
// [END getSubscriptions]
403+
// [END apps_script_admin_sdk_get_subscriptions]

advanced/adsense.gs

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
// [START listAdClients]
16+
// [START apps_script_adsense_list_ad_clients]
1717
/**
1818
* Logs a lists Ad clients.
1919
*/
@@ -40,9 +40,9 @@ function listAdClients() {
4040
pageToken = adClients.nextPageToken;
4141
} while (pageToken);
4242
}
43-
// [END listAdClients]
43+
// [END apps_script_adsense_list_ad_clients]
4444

45-
// [START listAdUnits]
45+
// [START apps_script_adsense_list_ad_units]
4646
/**
4747
* Lists ad units.
4848
* @param {string} adClientId The ad client ID.
@@ -68,9 +68,9 @@ function listAdUnits(adClientId) {
6868
pageToken = adUnits.nextPageToken;
6969
} while (pageToken);
7070
}
71-
// [END listAdUnits]
71+
// [END apps_script_adsense_list_ad_units]
7272

73-
// [START generateReport]
73+
// [START apps_script_adsense_generate_report]
7474
/**
7575
* Generates a spreadsheet report for an ad client.
7676
* @param {string} adClientId The ad client ID
@@ -124,4 +124,4 @@ function generateReport(adClientId) {
124124
function escapeFilterParameter(parameter) {
125125
return parameter.replace('\\', '\\\\').replace(',', '\\,');
126126
}
127-
// [END generateReport]
127+
// [END apps_script_adsense_generate_report]

advanced/analytics.gs

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
// [START listAccounts]
16+
// [START apps_script_analytics_accounts]
1717
/**
1818
* Lists Analytics accounts.
1919
*/
@@ -74,9 +74,9 @@ function listProfiles(accountId, webPropertyId) {
7474
Logger.log('\t\tNo web properties found.');
7575
}
7676
}
77-
// [END listAccounts]
77+
// [END apps_script_analytics_accounts]
7878

79-
// [START runReport]
79+
// [START apps_script_analytics_reports]
8080
/**
8181
* Runs a report of an Analytics profile ID. Creates a sheet with the report.
8282
* @param {string} profileId The profile ID.
@@ -121,4 +121,4 @@ function runReport(profileId) {
121121
Logger.log('No rows returned.');
122122
}
123123
}
124-
// [END runReport]
124+
// [END apps_script_analytics_reports]

advanced/bigquery.gs

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
// [START runQuery]
16+
// [START apps_script_bigquery_run_query]
1717
/**
1818
* Runs a BigQuery query and logs the results in a spreadsheet.
1919
*/
@@ -73,9 +73,9 @@ function runQuery() {
7373
Logger.log('No rows returned.');
7474
}
7575
}
76-
// [END runQuery]
76+
// [END apps_script_bigquery_run_query]
7777

78-
// [START loadCsv]
78+
// [START apps_script_bigquery_load_csv]
7979
/**
8080
* Loads a CSV into BigQuery
8181
*/
@@ -131,4 +131,4 @@ function loadCsv() {
131131
Logger.log('Load job started. Check on the status of it here: ' +
132132
'https://bigquery.cloud.google.com/jobs/%s', projectId);
133133
}
134-
// [END loadCsv]
134+
// [END apps_script_bigquery_load_csv]

advanced/calendar.gs

+12-12
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
// [START listCalendars]
16+
// [START apps_script_calendar_list_calendars]
1717
/**
1818
* Lists the calendars shown in the user's calendar list.
1919
*/
@@ -36,9 +36,9 @@ function listCalendars() {
3636
pageToken = calendars.nextPageToken;
3737
} while (pageToken);
3838
}
39-
// [END listCalendars]
39+
// [END apps_script_calendar_list_calendars]
4040

41-
// [START createEvent]
41+
// [START apps_script_calendar_create_event]
4242
/**
4343
* Creates an event in the user's default calendar.
4444
*/
@@ -83,9 +83,9 @@ function getRelativeDate(daysOffset, hour) {
8383
date.setMilliseconds(0);
8484
return date;
8585
}
86-
// [END createEvent]
86+
// [END apps_script_calendar_create_event]
8787

88-
// [START listNext10Events]
88+
// [START apps_script_calendar_list_events]
8989
/**
9090
* Lists the next 10 upcoming events in the user's default calendar.
9191
*/
@@ -114,9 +114,9 @@ function listNext10Events() {
114114
Logger.log('No events found.');
115115
}
116116
}
117-
// [END listNext10Events]
117+
// [END apps_script_calendar_list_events]
118118

119-
// [START logSyncedEvents]
119+
// [START apps_script_calendar_log_synced_events]
120120
/**
121121
* Retrieve and log events from the given calendar that have been modified
122122
* since the last sync. If the sync token is missing or invalid, log all
@@ -182,9 +182,9 @@ function logSyncedEvents(calendarId, fullSync) {
182182

183183
properties.setProperty('syncToken', events.nextSyncToken);
184184
}
185-
// [END logSyncedEvents]
185+
// [END apps_script_calendar_log_synced_events]
186186

187-
// [START conditionalUpdate]
187+
// [START apps_script_calendar_conditional_update]
188188
/**
189189
* Creates an event in the user's default calendar, waits 30 seconds, then
190190
* attempts to update the event's location, on the condition that the event
@@ -236,9 +236,9 @@ function conditionalUpdate() {
236236
Logger.log('Fetch threw an exception: ' + e);
237237
}
238238
}
239-
// [END conditionalUpdate]
239+
// [END apps_script_calendar_conditional_update]
240240

241-
// [START conditionalFetch]
241+
// [START apps_script_calendar_conditional_fetch]
242242
/**
243243
* Creates an event in the user's default calendar, then re-fetches the event
244244
* every second, on the condition that the event has changed since the last
@@ -281,4 +281,4 @@ function conditionalFetch() {
281281
}
282282
}
283283
}
284-
// [END conditionalFetch]
284+
// [END apps_script_calendar_conditional_fetch]

advanced/classroom.gs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
// [START listCourses]
16+
// [START apps_script_classroom_list_courses]
1717
/**
1818
* Lists 10 course names and IDs.
1919
*/
@@ -32,4 +32,4 @@ function listCourses() {
3232
Logger.log('No courses found.');
3333
}
3434
}
35-
// [END listCourses]
35+
// [END apps_script_classroom_list_courses]

advanced/doubleclick.gs

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
// [START listUserProfiles]
16+
// [START apps_script_doubleclick_list_user_profiles]
1717
/**
1818
* Logs all of the user profiles available in the account.
1919
*/
@@ -30,9 +30,9 @@ function listUserProfiles() {
3030
}
3131
}
3232
}
33-
// [END listUserProfiles]
33+
// [END apps_script_doubleclick_list_user_profiles]
3434

35-
// [START listActiveCampaigns]
35+
// [START apps_script_doubleclick_list_active_campaigns]
3636
/**
3737
* Logs names and ID's of all active campaigns.
3838
* Note the use of paging tokens to retrieve the whole list.
@@ -58,9 +58,9 @@ function listActiveCampaigns() {
5858
pageToken = result.nextPageToken;
5959
} while (pageToken);
6060
}
61-
// [END listActiveCampaigns]
61+
// [END apps_script_doubleclick_list_active_campaigns]
6262

63-
// [START createAdvertiserAndCampaign]
63+
// [START apps_script_doubleclick_create_advertiser_and_campaign]
6464
/**
6565
* Creates a new advertiser, and creates a new campaign with that advertiser.
6666
* The campaign is set to last for one month.
@@ -98,4 +98,4 @@ function createAdvertiserAndCampaign() {
9898
};
9999
DoubleClickCampaigns.Campaigns.insert(campaign, profileId);
100100
}
101-
// [END createAdvertiserAndCampaign]
101+
// [END apps_script_doubleclick_create_advertiser_and_campaign]

0 commit comments

Comments
 (0)