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/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.5');
    
    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.targetingTemplates.list({
        // Select only targeting templates with this advertiser ID.
        advertiserId: 'placeholder-value',
        // Select only targeting templates with these IDs.
        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, "template*2015" will return objects with names like "template June 2015", "template April 2015", or simply "template 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 "template" will match objects with name "my template", "template 2015", or simply "template".
        searchString: 'placeholder-value',
        // Field by which to sort the list.
        sortField: 'placeholder-value',
        // Order of sorted results.
        sortOrder: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "kind": "my_kind",
      //   "nextPageToken": "my_nextPageToken",
      //   "targetingTemplates": []
      // }
    }
    
    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.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.targetingTemplates.list({
        // Select only targeting templates with this advertiser ID.
        advertiserId: 'placeholder-value',
        // Select only targeting templates with these IDs.
        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, "template*2015" will return objects with names like "template June 2015", "template April 2015", or simply "template 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 "template" will match objects with name "my template", "template 2015", or simply "template".
        searchString: 'placeholder-value',
        // Field by which to sort the list.
        sortField: 'placeholder-value',
        // Order of sorted results.
        sortOrder: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "kind": "my_kind",
      //   "nextPageToken": "my_nextPageToken",
      //   "targetingTemplates": []
      // }
    }
    
    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.targetingTemplates.list({
        // Select only targeting templates with this advertiser ID.
        advertiserId: 'placeholder-value',
        // Select only targeting templates with these IDs.
        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, "template*2015" will return objects with names like "template June 2015", "template April 2015", or simply "template 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 "template" will match objects with name "my template", "template 2015", or simply "template".
        searchString: 'placeholder-value',
        // Field by which to sort the list.
        sortField: 'placeholder-value',
        // Order of sorted results.
        sortOrder: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "kind": "my_kind",
      //   "nextPageToken": "my_nextPageToken",
      //   "targetingTemplates": []
      // }
    }
    
    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.5');
    
    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.targetingTemplates.get({
        // Targeting template ID.
        id: 'placeholder-value',
        // User profile ID associated with this request.
        profileId: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "accountId": "my_accountId",
      //   "advertiserId": "my_advertiserId",
      //   "advertiserIdDimensionValue": {},
      //   "dayPartTargeting": {},
      //   "geoTargeting": {},
      //   "id": "my_id",
      //   "keyValueTargetingExpression": {},
      //   "kind": "my_kind",
      //   "languageTargeting": {},
      //   "listTargetingExpression": {},
      //   "name": "my_name",
      //   "subaccountId": "my_subaccountId",
      //   "technologyTargeting": {}
      // }
    }
    
    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.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.targetingTemplates.get({
        // Targeting template ID.
        id: 'placeholder-value',
        // User profile ID associated with this request.
        profileId: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "accountId": "my_accountId",
      //   "advertiserId": "my_advertiserId",
      //   "advertiserIdDimensionValue": {},
      //   "dayPartTargeting": {},
      //   "geoTargeting": {},
      //   "id": "my_id",
      //   "keyValueTargetingExpression": {},
      //   "kind": "my_kind",
      //   "languageTargeting": {},
      //   "listTargetingExpression": {},
      //   "name": "my_name",
      //   "subaccountId": "my_subaccountId",
      //   "technologyTargeting": {}
      // }
    }
    
    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