Skip to content

Commit a1cf491

Browse files
grantEric Koleda
authored and
Eric Koleda
committed
Update slides_create_image comment. (googleworkspace#47)
* Update snippets.js * refactor: Removed unused method params * push
1 parent 4d0fb18 commit a1cf491

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

slides/snippets/snippets.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,9 @@ function createTextboxWithText(presentationId, pageId, callback) {
119119
// [END slides_create_textbox_with_text]
120120
}
121121

122-
function createImage(presentationId, pageId, imageFilePath, imageMimetype, callback) {
122+
function createImage(presentationId, pageId, callback) {
123123
var imageUrl = IMAGE_URL;
124124
// [START slides_create_image]
125-
// Temporarily upload a local image file to Drive, in order to obtain a URL
126-
// for the image. Alternatively, you can provide the Slides service a URL of
127-
// an already hosted image.
128-
//
129-
// We will use an existing image under the variable: imageUrl.
130-
//
131125
// Create a new image, using the supplied object ID, with content downloaded from imageUrl.
132126
var requests = [];
133127
var imageId = 'MyImage_01';

slides/snippets/test_snippets.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ var SCOPES = [
2424
];
2525

2626
// Constants
27-
var IMAGE_FILE_PATH = 'images/googlelogo_color_272x92dp.png';
2827
var IMAGE_URL = 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png';
29-
var IMAGE_MIMETYPE = 'image/png';
3028
var TEMPLATE_PRESENTATION_ID = '1E7tKQyX8H7zI7F8_v7mNDY5VyHZ3NNcjUQhkGXoITnw';
3129
var DATA_SPREADSHEET_ID = '14KaZMq2aCAGt5acV77zaA_Ps8aDt04G7T0ei4KiXLX8';
3230
var CHART_ID = 1107320627;
@@ -121,7 +119,7 @@ function testCreateImage(done) {
121119
createTestPresentation(function(presentationId) {
122120
addSlides(presentationId, 1, 'BLANK', function(ids) {
123121
var pageId = ids[0];
124-
createImage(presentationId, pageId, IMAGE_FILE_PATH, IMAGE_MIMETYPE, function(response) {
122+
createImage(presentationId, pageId, function(response) {
125123
assert.equal(1, response.length);
126124
var imageId = response[0].createImage.objectId;
127125
assert.isNotNull(imageId);

0 commit comments

Comments
 (0)