Parameters for request
Optionally override request options, such as url
, method
, and encoding
.
Optional
params: Params$Resource$Replies$CreateOptional
options: MethodOptionsDeletes a reply.
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/drive.googleapis.com
// - Login into gcloud by running:
// `$ gcloud auth application-default login`
// - Install the npm module by running:
// `$ npm install googleapis`
const {google} = require('googleapis');
const drive = google.drive('v3');
async function main() {
const auth = new google.auth.GoogleAuth({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: [
'https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/drive.file',
],
});
// Acquire an auth client, and bind it to all future calls
const authClient = await auth.getClient();
google.options({auth: authClient});
// Do the magic
const res = await drive.replies.delete({
// The ID of the comment.
commentId: 'placeholder-value',
// The ID of the file.
fileId: 'placeholder-value',
// The ID of the reply.
replyId: 'placeholder-value',
});
console.log(res.data);
}
main().catch(e => {
console.error(e);
throw e;
});
A promise if used with async/await, or void if used with a callback.
Parameters for request
Optionally override request options, such as url
, method
, and encoding
.
Optional
params: Params$Resource$Replies$DeleteOptional
options: MethodOptionsGets a reply by ID.
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/drive.googleapis.com
// - Login into gcloud by running:
// `$ gcloud auth application-default login`
// - Install the npm module by running:
// `$ npm install googleapis`
const {google} = require('googleapis');
const drive = google.drive('v3');
async function main() {
const auth = new google.auth.GoogleAuth({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: [
'https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/drive.file',
'https://www.googleapis.com/auth/drive.readonly',
],
});
// Acquire an auth client, and bind it to all future calls
const authClient = await auth.getClient();
google.options({auth: authClient});
// Do the magic
const res = await drive.replies.get({
// The ID of the comment.
commentId: 'placeholder-value',
// The ID of the file.
fileId: 'placeholder-value',
// Whether to return deleted replies. Deleted replies will not include their original content.
includeDeleted: 'placeholder-value',
// The ID of the reply.
replyId: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "action": "my_action",
// "author": {},
// "content": "my_content",
// "createdTime": "my_createdTime",
// "deleted": false,
// "htmlContent": "my_htmlContent",
// "id": "my_id",
// "kind": "my_kind",
// "modifiedTime": "my_modifiedTime"
// }
}
main().catch(e => {
console.error(e);
throw e;
});
A promise if used with async/await, or void if used with a callback.
Parameters for request
Optionally override request options, such as url
, method
, and encoding
.
Optional
params: Params$Resource$Replies$GetOptional
options: MethodOptionsLists a comment's replies.
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/drive.googleapis.com
// - Login into gcloud by running:
// `$ gcloud auth application-default login`
// - Install the npm module by running:
// `$ npm install googleapis`
const {google} = require('googleapis');
const drive = google.drive('v3');
async function main() {
const auth = new google.auth.GoogleAuth({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: [
'https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/drive.file',
'https://www.googleapis.com/auth/drive.readonly',
],
});
// Acquire an auth client, and bind it to all future calls
const authClient = await auth.getClient();
google.options({auth: authClient});
// Do the magic
const res = await drive.replies.list({
// The ID of the comment.
commentId: 'placeholder-value',
// The ID of the file.
fileId: 'placeholder-value',
// Whether to include deleted replies. Deleted replies will not include their original content.
includeDeleted: 'placeholder-value',
// The maximum number of replies to return per page.
pageSize: 'placeholder-value',
// The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.
pageToken: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "kind": "my_kind",
// "nextPageToken": "my_nextPageToken",
// "replies": []
// }
}
main().catch(e => {
console.error(e);
throw e;
});
A promise if used with async/await, or void if used with a callback.
Parameters for request
Optionally override request options, such as url
, method
, and encoding
.
Optional
params: Params$Resource$Replies$ListOptional
options: MethodOptionsUpdates a reply with patch semantics.
// Before running the sample:
// - Enable the API at:
// https://console.developers.google.com/apis/api/drive.googleapis.com
// - Login into gcloud by running:
// `$ gcloud auth application-default login`
// - Install the npm module by running:
// `$ npm install googleapis`
const {google} = require('googleapis');
const drive = google.drive('v3');
async function main() {
const auth = new google.auth.GoogleAuth({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: [
'https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/drive.file',
],
});
// Acquire an auth client, and bind it to all future calls
const authClient = await auth.getClient();
google.options({auth: authClient});
// Do the magic
const res = await drive.replies.update({
// The ID of the comment.
commentId: 'placeholder-value',
// The ID of the file.
fileId: 'placeholder-value',
// The ID of the reply.
replyId: 'placeholder-value',
// Request body metadata
requestBody: {
// request body parameters
// {
// "action": "my_action",
// "author": {},
// "content": "my_content",
// "createdTime": "my_createdTime",
// "deleted": false,
// "htmlContent": "my_htmlContent",
// "id": "my_id",
// "kind": "my_kind",
// "modifiedTime": "my_modifiedTime"
// }
},
});
console.log(res.data);
// Example response
// {
// "action": "my_action",
// "author": {},
// "content": "my_content",
// "createdTime": "my_createdTime",
// "deleted": false,
// "htmlContent": "my_htmlContent",
// "id": "my_id",
// "kind": "my_kind",
// "modifiedTime": "my_modifiedTime"
// }
}
main().catch(e => {
console.error(e);
throw e;
});
A promise if used with async/await, or void if used with a callback.
Parameters for request
Optionally override request options, such as url
, method
, and encoding
.
Optional
params: Params$Resource$Replies$UpdateOptional
options: MethodOptionsGenerated using TypeDoc
Creates a new reply to a comment.
Example
Returns
A promise if used with async/await, or void if used with a callback.