- 【MACRO】Google Apps Script 質問スレ【DRIVE】
264 :デフォルトの名無しさん[sage]:2015/07/20(月) 01:28:27.60 ID:M+3F+JJV - getの方は出来たんだけどなぁ
もうちょっと読んでみよ英語分かんないけど function getImage(id) { var service = getService(); if (service.hasAccess()) { var url = 'https://api.imgur.com/3/image/' + id; var response = UrlFetchApp.fetch(url, { method: 'get', headers: { Authorization: 'Bearer ' + service.getAccessToken() } }); var result = JSON.parse(response.getContentText()); return result; // Logger.log(result); } else { var authorizationUrl = service.getAuthorizationUrl(); Logger.log('Open the following URL and re-run the script: %s', authorizationUrl); } }
|