How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/driveactivity.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 driveactivity = google.driveactivity('v2');
    
    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.activity',
          'https://www.googleapis.com/auth/drive.activity.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 driveactivity.activity.query({
        // Request body metadata
        requestBody: {
          // request body parameters
          // {
          //   "ancestorName": "my_ancestorName",
          //   "consolidationStrategy": {},
          //   "filter": "my_filter",
          //   "itemName": "my_itemName",
          //   "pageSize": 0,
          //   "pageToken": "my_pageToken"
          // }
        },
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "activities": [],
      //   "nextPageToken": "my_nextPageToken"
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • const {google} = require('googleapis');
    const driveactivity = google.driveactivity('v2');
    Docs
  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/dfareporting.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 dfareporting = google.dfareporting('v3.4');
    
    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/dfatrafficking'],
      });
    
      // 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 dfareporting.floodlightActivityGroups.list({
        // Select only floodlight activity groups with the specified advertiser ID. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.
        advertiserId: 'placeholder-value',
        // Select only floodlight activity groups with the specified floodlight configuration ID. Must specify either advertiserId, or floodlightConfigurationId for a non-empty result.
        floodlightConfigurationId: 'placeholder-value',
        // Select only floodlight activity groups with the specified IDs. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.
        ids: 'placeholder-value',
        // Maximum number of results to return.
        maxResults: 'placeholder-value',
        // Value of the nextPageToken from the previous result page.
        pageToken: 'placeholder-value',
        // User profile ID associated with this request.
        profileId: 'placeholder-value',
        // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "floodlightactivitygroup*2015" will return objects with names like "floodlightactivitygroup June 2015", "floodlightactivitygroup April 2015", or simply "floodlightactivitygroup 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "floodlightactivitygroup" will match objects with name "my floodlightactivitygroup activity", "floodlightactivitygroup 2015", or simply "floodlightactivitygroup".
        searchString: 'placeholder-value',
        // Field by which to sort the list.
        sortField: 'placeholder-value',
        // Order of sorted results.
        sortOrder: 'placeholder-value',
        // Select only floodlight activity groups with the specified floodlight activity group type.
        type: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "floodlightActivityGroups": [],
      //   "kind": "my_kind",
      //   "nextPageToken": "my_nextPageToken"
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/dfareporting.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 dfareporting = google.dfareporting('v3.3');
    
    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/dfatrafficking'],
      });
    
      // 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 dfareporting.floodlightActivityGroups.list({
        // Select only floodlight activity groups with the specified advertiser ID. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.
        advertiserId: 'placeholder-value',
        // Select only floodlight activity groups with the specified floodlight configuration ID. Must specify either advertiserId, or floodlightConfigurationId for a non-empty result.
        floodlightConfigurationId: 'placeholder-value',
        // Select only floodlight activity groups with the specified IDs. Must specify either advertiserId or floodlightConfigurationId for a non-empty result.
        ids: 'placeholder-value',
        // Maximum number of results to return.
        maxResults: 'placeholder-value',
        // Value of the nextPageToken from the previous result page.
        pageToken: 'placeholder-value',
        // User profile ID associated with this request.
        profileId: 'placeholder-value',
        // Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "floodlightactivitygroup*2015" will return objects with names like "floodlightactivitygroup June 2015", "floodlightactivitygroup April 2015", or simply "floodlightactivitygroup 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "floodlightactivitygroup" will match objects with name "my floodlightactivitygroup activity", "floodlightactivitygroup 2015", or simply "floodlightactivitygroup".
        searchString: 'placeholder-value',
        // Field by which to sort the list.
        sortField: 'placeholder-value',
        // Order of sorted results.
        sortOrder: 'placeholder-value',
        // Select only floodlight activity groups with the specified floodlight activity group type.
        type: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "floodlightActivityGroups": [],
      //   "kind": "my_kind",
      //   "nextPageToken": "my_nextPageToken"
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/civicinfo.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 civicinfo = google.civicinfo('v2');
    
    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: [],
      });
    
      // 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 civicinfo.divisions.search({
        // The search query. Queries can cover any parts of a OCD ID or a human readable division name. All words given in the query are treated as required patterns. In addition to that, most query operators of the Apache Lucene library are supported. See http://lucene.apache.org/core/2_9_4/queryparsersyntax.html
        query: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "kind": "my_kind",
      //   "results": []
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples