Parameters for request
Optionally override request options, such as url
, method
, and encoding
.
Optional
params: Params$Resource$Teamdrives$CreateOptional
options: MethodOptionsDeprecated use drives.delete instead.
// 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'],
});
// 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.teamdrives.delete({
// The ID of the Team Drive
teamDriveId: '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$Teamdrives$DeleteOptional
options: MethodOptionsDeprecated use drives.get instead.
// 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.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.teamdrives.get({
// The ID of the Team Drive
teamDriveId: 'placeholder-value',
// Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the Team Drive belongs.
useDomainAdminAccess: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "backgroundImageFile": {},
// "backgroundImageLink": "my_backgroundImageLink",
// "capabilities": {},
// "colorRgb": "my_colorRgb",
// "createdTime": "my_createdTime",
// "id": "my_id",
// "kind": "my_kind",
// "name": "my_name",
// "orgUnitId": "my_orgUnitId",
// "restrictions": {},
// "themeId": "my_themeId"
// }
}
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$Teamdrives$GetOptional
options: MethodOptionsDeprecated use drives.list instead.
// 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.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.teamdrives.list({
// Maximum number of Team Drives to return.
pageSize: 'placeholder-value',
// Page token for Team Drives.
pageToken: 'placeholder-value',
// Query string for searching Team Drives.
q: 'placeholder-value',
// Issue the request as a domain administrator; if set to true, then all Team Drives of the domain in which the requester is an administrator are returned.
useDomainAdminAccess: 'placeholder-value',
});
console.log(res.data);
// Example response
// {
// "kind": "my_kind",
// "nextPageToken": "my_nextPageToken",
// "teamDrives": []
// }
}
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$Teamdrives$ListOptional
options: MethodOptionsDeprecated use drives.update instead
// 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'],
});
// 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.teamdrives.update({
// The ID of the Team Drive
teamDriveId: 'placeholder-value',
// Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the Team Drive belongs.
useDomainAdminAccess: 'placeholder-value',
// Request body metadata
requestBody: {
// request body parameters
// {
// "backgroundImageFile": {},
// "backgroundImageLink": "my_backgroundImageLink",
// "capabilities": {},
// "colorRgb": "my_colorRgb",
// "createdTime": "my_createdTime",
// "id": "my_id",
// "kind": "my_kind",
// "name": "my_name",
// "orgUnitId": "my_orgUnitId",
// "restrictions": {},
// "themeId": "my_themeId"
// }
},
});
console.log(res.data);
// Example response
// {
// "backgroundImageFile": {},
// "backgroundImageLink": "my_backgroundImageLink",
// "capabilities": {},
// "colorRgb": "my_colorRgb",
// "createdTime": "my_createdTime",
// "id": "my_id",
// "kind": "my_kind",
// "name": "my_name",
// "orgUnitId": "my_orgUnitId",
// "restrictions": {},
// "themeId": "my_themeId"
// }
}
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$Teamdrives$UpdateOptional
options: MethodOptionsGenerated using TypeDoc
Deprecated use drives.create instead.
Example
Returns
A promise if used with async/await, or void if used with a callback.