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/content.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 content = google.content('v2.1');
    
    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/content'],
      });
    
      // 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 content.settlementtransactions.list({
        // The maximum number of transactions to return in the response, used for paging. The default value is 200 transactions per page, and the maximum allowed value is 5000 transactions per page.
        maxResults: 'placeholder-value',
        // The Merchant Center account to list transactions for.
        merchantId: 'placeholder-value',
        // The token returned by the previous request.
        pageToken: 'placeholder-value',
        // The Google-provided ID of the settlement.
        settlementId: 'placeholder-value',
        // The list of transactions to return. If not set, all transactions will be returned.
        transactionIds: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "kind": "my_kind",
      //   "nextPageToken": "my_nextPageToken",
      //   "resources": []
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/content.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 content = google.content('v2.1');
    
    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/content'],
      });
    
      // 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 content.settlementreports.list({
        // The maximum number of settlements to return in the response, used for paging. The default value is 200 returns per page, and the maximum allowed value is 5000 returns per page.
        maxResults: 'placeholder-value',
        // The Merchant Center account to list settlements for.
        merchantId: 'placeholder-value',
        // The token returned by the previous request.
        pageToken: 'placeholder-value',
        // Obtains settlements which have transactions before this date (inclusively), in ISO 8601 format.
        transferEndDate: 'placeholder-value',
        // Obtains settlements which have transactions after this date (inclusively), in ISO 8601 format.
        transferStartDate: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "kind": "my_kind",
      //   "nextPageToken": "my_nextPageToken",
      //   "resources": []
      // }
    }
    
    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.contentCategories.list({
        // Select only content categories 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, "contentcategory*2015" will return objects with names like "contentcategory June 2015", "contentcategory April 2015", or simply "contentcategory 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 "contentcategory" will match objects with name "my contentcategory", "contentcategory 2015", or simply "contentcategory".
        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
      // {
      //   "contentCategories": [],
      //   "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.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.contentCategories.list({
        // Select only content categories 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, "contentcategory*2015" will return objects with names like "contentcategory June 2015", "contentcategory April 2015", or simply "contentcategory 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 "contentcategory" will match objects with name "my contentcategory", "contentcategory 2015", or simply "contentcategory".
        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
      // {
      //   "contentCategories": [],
      //   "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.contentCategories.list({
        // Select only content categories 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, "contentcategory*2015" will return objects with names like "contentcategory June 2015", "contentcategory April 2015", or simply "contentcategory 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 "contentcategory" will match objects with name "my contentcategory", "contentcategory 2015", or simply "contentcategory".
        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
      // {
      //   "contentCategories": [],
      //   "kind": "my_kind",
      //   "nextPageToken": "my_nextPageToken"
      // }
    }
    
    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