Skip to content

Commit c5d6ab9

Browse files
committed
Update slides snippet region tags
1 parent bcae359 commit c5d6ab9

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

slides/api/Snippets.gs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,32 @@ var title = 'my title';
2121
function Snippets() {}
2222

2323
Snippets.prototype.createPresentation = function() {
24-
// [START create_presentation]
24+
// [START slides_create_presentation]
2525
var presentation = Slides.Presentations.create({
2626
title: title,
2727
});
2828
console.log('Created presentation with ID: %s', presentation.presentationId);
29-
// [END create_presentation]
29+
// [END slides_create_presentation]
3030
return presentation;
3131
};
3232

3333
Snippets.prototype.copyPresentation = function() {
3434
var presentationId = this.createPresentation().presentationId;
3535
var copyTitle = 'Copy Title';
36-
// [START copy_presentation]
36+
// [START slides_copy_presentation]
3737
var request = {
3838
name: copyTitle,
3939
};
4040
var driveResponse = Drive.Files.copy({
4141
resource: request,
4242
}, presentationId);
4343
var presentationCopyId = driveResponse.id;
44-
// [END copy_presentation]
44+
// [END slides_copy_presentation]
4545
return presentationCopyId;
4646
};
4747

4848
Snippets.prototype.createSlide = function(presentationId, pageId) {
49-
// [START create_slide]
49+
// [START slides_create_slide]
5050
var requests = [{
5151
createSlide: {
5252
objectId: pageId,
@@ -65,12 +65,12 @@ Snippets.prototype.createSlide = function(presentationId, pageId) {
6565
requests: requests,
6666
}, presentationId);
6767
console.log('Created slide with ID: %s', createSlideResponse.replies[0].createSlide.objectId);
68-
// [END create_slide]
68+
// [END slides_create_slide]
6969
return createSlideResponse;
7070
};
7171

7272
Snippets.prototype.createTextboxWithText = function(presentationId, pageId) {
73-
// [START create_textbox_with_text]
73+
// [START slides_create_textbox_with_text]
7474
// Create a new square textbox, using the supplied element ID.
7575
var elementId = 'MyTextBox_01';
7676
var pt350 = {
@@ -113,13 +113,13 @@ Snippets.prototype.createTextboxWithText = function(presentationId, pageId) {
113113
}, presentationId);
114114
var createShapeResponse = createTextboxWithTextResponse.replies[0].createShape;
115115
console.log('Created textbox with ID: %s', createShapeResponse.objectId);
116-
// [END create_textbox_with_text]
116+
// [END slides_create_textbox_with_text]
117117
return createTextboxWithTextResponse;
118118
};
119119

120120
Snippets.prototype.createImage = function(presentationId, pageId) {
121121
var imageFileId = '0B2P_aO_vjnJ4aERnX2ZzbUtMZXc';
122-
// [START create_image]
122+
// [START slides_create_image]
123123
// Add a new image to the presentation page. The image is assumed to exist in
124124
// the user's Drive, and have 'imageFileId' as its file ID.
125125
var requests = [];
@@ -158,13 +158,13 @@ Snippets.prototype.createImage = function(presentationId, pageId) {
158158

159159
var createImageResponse = response.replies;
160160
console.log('Created image with ID: %s', createImageResponse[0].createImage.objectId);
161-
// [END create_image]
161+
// [END slides_create_image]
162162
return createImageResponse;
163163
};
164164

165165
Snippets.prototype.textMerging = function(templatePresentationId, dataSpreadsheetId) {
166166
var responses = [];
167-
// [START text_merging]
167+
// [START slides_text_merging]
168168
// Use the Sheets API to load data, one record per row.
169169
var dataRangeNotation = 'Customers!A2:M6';
170170
var values = SpreadsheetApp.openById(dataSpreadsheetId).getRange(dataRangeNotation).getValues();
@@ -231,14 +231,14 @@ Snippets.prototype.textMerging = function(templatePresentationId, dataSpreadshee
231231
}
232232
// [END_EXCLUDE]
233233
}
234-
// [END text_merging]
234+
// [END slides_text_merging]
235235
};
236236

237237
Snippets.prototype.imageMerging = function(templatePresentationId, imageUrl, customerName) {
238238
var logoUrl = imageUrl;
239239
var customerGraphicUrl = imageUrl;
240240

241-
// [START image_merging]
241+
// [START slides_image_merging]
242242
// Duplicate the template presentation using the Drive API.
243243
var copyTitle = customerName + ' presentation';
244244
var driveResponse = Drive.Files.copy({
@@ -279,7 +279,7 @@ Snippets.prototype.imageMerging = function(templatePresentationId, imageUrl, cus
279279
});
280280
console.log('Created merged presentation with ID: %s', presentationCopyId);
281281
console.log('Replaced %s shapes with images.', numReplacements);
282-
// [END image_merging]
282+
// [END slides_image_merging]
283283
return batchUpdateResponse;
284284
};
285285

@@ -310,7 +310,7 @@ Snippets.prototype.simpleTextReplace = function(presentationId, shapeId, replace
310310
};
311311

312312
Snippets.prototype.textStyleUpdate = function(presentationId, shapeId) {
313-
// [START text_style_update]
313+
// [START slides_text_style_update]
314314
// Update the text style so that the first 5 characters are bolded
315315
// and italicized, the next 5 are displayed in blue 14 pt Times
316316
// New Roman font, and the next 5 are hyperlinked.
@@ -376,12 +376,12 @@ Snippets.prototype.textStyleUpdate = function(presentationId, shapeId) {
376376
requests: requests,
377377
}, presentationId);
378378
console.log('Updated the text style for shape with ID: %s', shapeId);
379-
// [END text_style_update]
379+
// [END slides_text_style_update]
380380
return batchUpdateResponse;
381381
};
382382

383383
Snippets.prototype.createBulletedText = function(presentationId, shapeId) {
384-
// [START create_bulleted_text]
384+
// [START slides_create_bulleted_text]
385385
// Add arrow-diamond-disc bullets to all text in the shape.
386386
var requests = [{
387387
createParagraphBullets: {
@@ -398,12 +398,12 @@ Snippets.prototype.createBulletedText = function(presentationId, shapeId) {
398398
requests: requests,
399399
}, presentationId);
400400
console.log('Added bullets to text in shape with ID: %s', shapeId);
401-
// [END create_bulleted_text]
401+
// [END slides_create_bulleted_text]
402402
return batchUpdateResponse;
403403
};
404404

405405
Snippets.prototype.createSheetsChart = function(presentationId, pageId, shapeId, sheetChartId) {
406-
// [START create_sheets_chart]
406+
// [START slides_create_sheets_chart]
407407
// Embed a Sheets chart (indicated by the spreadsheetId and sheetChartId) onto
408408
// a page in the presentation. Setting the linking mode as 'LINKED' allows the
409409
// chart to be refreshed if the Sheets version is updated.
@@ -440,12 +440,12 @@ Snippets.prototype.createSheetsChart = function(presentationId, pageId, shapeId,
440440
requests: requests,
441441
}, presentationId);
442442
console.log('Added a linked Sheets chart with ID: %s', presentationChartId);
443-
// [END create_sheets_chart]
443+
// [END slides_create_sheets_chart]
444444
return batchUpdateResponse;
445445
};
446446

447447
Snippets.prototype.refreshSheetsChart = function(presentationId, presentationChartId) {
448-
// [START refresh_sheets_chart]
448+
// [START slides_refresh_sheets_chart]
449449
var requests = [{
450450
refreshSheetsChart: {
451451
objectId: presentationChartId,
@@ -457,6 +457,6 @@ Snippets.prototype.refreshSheetsChart = function(presentationId, presentationCha
457457
requests: requests,
458458
}, presentationId);
459459
console.log('Refreshed a linked Sheets chart with ID: %s', presentationChartId);
460-
// [END refresh_sheets_chart]
460+
// [END slides_refresh_sheets_chart]
461461
return batchUpdateResponse;
462462
};

0 commit comments

Comments
 (0)