Hierarchy

  • Resource$About

Constructors

Properties

Methods

Constructors

  • Parameters

    • context: APIRequestContext

    Returns Resource$About

Properties

context: APIRequestContext

Methods

  • Gets information about the user, the user's Drive, and system capabilities.

    Example

    // 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.appdata',
    'https://www.googleapis.com/auth/drive.file',
    'https://www.googleapis.com/auth/drive.metadata',
    'https://www.googleapis.com/auth/drive.metadata.readonly',
    'https://www.googleapis.com/auth/drive.photos.readonly',
    '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.about.get({});
    console.log(res.data);

    // Example response
    // {
    // "appInstalled": false,
    // "canCreateDrives": false,
    // "canCreateTeamDrives": false,
    // "driveThemes": [],
    // "exportFormats": {},
    // "folderColorPalette": [],
    // "importFormats": {},
    // "kind": "my_kind",
    // "maxImportSizes": {},
    // "maxUploadSize": "my_maxUploadSize",
    // "storageQuota": {},
    // "teamDriveThemes": [],
    // "user": {}
    // }
    }

    main().catch(e => {
    console.error(e);
    throw e;
    });

    Returns

    A promise if used with async/await, or void if used with a callback.

    Parameters

    Returns GaxiosPromise<Readable>

  • Parameters

    Returns GaxiosPromise<Schema$About>

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

Generated using TypeDoc