google-apis-explorer

Change Google Calendar Event Free/Busy with Calendar API

非 Y 不嫁゛ 提交于 2020-03-22 10:32:42
问题 I have a GAS web app for reserving rooms. When the app creates the event, it currently defaults to "Busy" for the event. I am trying to set the default to "Free". I found a GAS forum entry that recommends using the Advanced Google Calendar API to edit the transparency field (Source: https://code.google.com/p/google-apps-script-issues/issues/detail?id=2341). The script they suggested was var changes = { transparency: "transparent" }; Calendar.Events.patch(changes, cal_id, event_id); I have the

Change Google Calendar Event Free/Busy with Calendar API

你说的曾经没有我的故事 提交于 2020-03-22 10:32:32
问题 I have a GAS web app for reserving rooms. When the app creates the event, it currently defaults to "Busy" for the event. I am trying to set the default to "Free". I found a GAS forum entry that recommends using the Advanced Google Calendar API to edit the transparency field (Source: https://code.google.com/p/google-apps-script-issues/issues/detail?id=2341). The script they suggested was var changes = { transparency: "transparent" }; Calendar.Events.patch(changes, cal_id, event_id); I have the

How to Youtube transcript with api (captions.download

笑着哭i 提交于 2020-01-23 02:49:36
问题 I have built a javascript code to be able to read any Youtube video transcript (gapi.client.youtube.captions.download). The auth 2.0 works fine, I run my app in a local web server everything is fine, the problem is that when I run the request I have the error 403: cb=gapi.loaded_0:164 GET https://content.googleapis.com/youtube/v3/captions/My_API_Key 403 I have not found any solution here in StackOverflow.. any idea ? Here is my js file: const CLIENT_ID = 'My_Client_ID'; const DISCOVERY_DOCS =

Reply to a thread (mail) with attachment being sent as a new mail in sender account - gmail api

佐手、 提交于 2020-01-06 08:31:10
问题 I am trying to send reply to a thread (mail) with attachment using gmail api. But it is being sent as a new mail in senders account, but in receiver account it is seen in same thread. This mail should be in same thread for both sender and receiver sides as well. I am using node js and request-promise module for achieving this. Here is my piece of code. Please have a look and let me know where I am wrong. let from = req.body.email; let mailString = ''; for (let i in req.files) { mailString +=

How do I update my google sheet in v4?

不羁的心 提交于 2019-12-28 07:17:09
问题 I am new in google sheets v4 and I just want to know how can I update my google sheet in v4. I am using Nodejs and following is the code sample link which I am using Method: spreadsheets.values.update 回答1: You can use the sample script of the link. In you case, combining Quickstart and the sample script may be useful for you. The sample script is as follows. In this sample script, the text of sample text is imported to the cell a1 of Sheet1 . Sample script : var fs = require('fs'); var

Error on list files using folderId

穿精又带淫゛_ 提交于 2019-12-25 18:50:27
问题 I need to list files by folderId Using the reference code. https://developers.google.com/drive/v2/reference/children/list ERROR : Call to a member function listChildren() on null 回答1: use This code $service->files->listFiles(array('q' => "'<FOLDER_ID>' in parents")); 来源: https://stackoverflow.com/questions/47786381/error-on-list-files-using-folderid

gmail with multiple attachments not working

江枫思渺然 提交于 2019-12-25 02:59:27
问题 When mail is sent with multiple attachments using gmail api, mail is not going properly. Attachments are not going in mail, instead some code is going in mail. I am using node js and request-promise module for achieving this. I have tried sending attachments by setting boundaries on attachments. Here is the piece of code that I have written. let user = await db.model('User').findOne({ _id: userId }); let from = user.crmOptions.email; let mailString = ''; for (let i in req.files) { mailString

Email with attachment is not going properly with gmail api

*爱你&永不变心* 提交于 2019-12-24 06:04:34
问题 This is the following piece of code I have written in node.js for sending email with attachment using gmail api: And I am using request-promise module of node js to send request to that api. let user = await db.model('User').findOne({ _id: userId }); let filepath = fs.readFileSync(req.file.path).toString('base64'); // let filepath = fs.readFileSync(req.file.path); let from = user.crmOptions.email; let raw = [ 'Content-Type: multipart/mixed; boundary="boundary_mail"\r\n', 'MIME-Version: 1.0\r

YouTube analytics API rows empty

家住魔仙堡 提交于 2019-12-23 19:47:10
问题 I know this question has been answered before, but I seem to have a different problem. Up until a few days ago, my querying of YouTube never had a problem. Now, however, every time I query data on any video the rows of actual video data come back as a single empty array. Here is my code in full: # -*- coding: utf-8 -*- import os import google.oauth2.credentials import google_auth_oauthlib.flow from googleapiclient.discovery import build from googleapiclient.errors import HttpError from google

i want to download file from google drive using Drive Api

旧巷老猫 提交于 2019-12-23 03:36:13
问题 in this code : file_id = '0BwwA4oUTeiV1UVNwOHItT0xfa2M' request = drive_service.files().get_media(fileId=file_id) fh = io.BytesIO() downloader = MediaIoBaseDownload(fh, request) done = False while done is False: status, done = downloader.next_chunk() print "Download %d%%." % int(status.progress() * 100) I don't know how to get file_id , I was getting file_id while uploading but now I am not able to figure out how to get file_id of the file which is present on Google Drive. Ex. if my uploaded