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/dns.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 dns = google.dns('v1');
    
    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/cloud-platform',
          'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
        ],
      });
    
      // 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 dns.changes.create({
        // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
        clientOperationId: 'placeholder-value',
        // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
        managedZone: 'placeholder-value',
        // Identifies the project addressed by this request.
        project: 'placeholder-value',
    
        // Request body metadata
        requestBody: {
          // request body parameters
          // {
          //   "additions": [],
          //   "deletions": [],
          //   "id": "my_id",
          //   "isServing": false,
          //   "kind": "my_kind",
          //   "startTime": "my_startTime",
          //   "status": "my_status"
          // }
        },
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "additions": [],
      //   "deletions": [],
      //   "id": "my_id",
      //   "isServing": false,
      //   "kind": "my_kind",
      //   "startTime": "my_startTime",
      //   "status": "my_status"
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/dns.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 dns = google.dns('v1');
    
    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/cloud-platform',
          'https://www.googleapis.com/auth/cloud-platform.read-only',
          'https://www.googleapis.com/auth/ndev.clouddns.readonly',
          'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
        ],
      });
    
      // 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 dns.changes.list({
        // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
        managedZone: 'placeholder-value',
        // Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.
        maxResults: 'placeholder-value',
        // Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
        pageToken: 'placeholder-value',
        // Identifies the project addressed by this request.
        project: 'placeholder-value',
        // Sorting criterion. The only supported value is change sequence.
        sortBy: 'placeholder-value',
        // Sorting order direction: 'ascending' or 'descending'.
        sortOrder: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "changes": [],
      //   "header": {},
      //   "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/dns.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 dns = google.dns('v1');
    
    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/cloud-platform',
          'https://www.googleapis.com/auth/cloud-platform.read-only',
          'https://www.googleapis.com/auth/ndev.clouddns.readonly',
          'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
        ],
      });
    
      // 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 dns.changes.get({
        // The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.
        changeId: 'placeholder-value',
        // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
        clientOperationId: 'placeholder-value',
        // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
        managedZone: 'placeholder-value',
        // Identifies the project addressed by this request.
        project: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "additions": [],
      //   "deletions": [],
      //   "id": "my_id",
      //   "isServing": false,
      //   "kind": "my_kind",
      //   "startTime": "my_startTime",
      //   "status": "my_status"
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/dns.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 dns = google.dns('v1beta2');
    
    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/cloud-platform',
          'https://www.googleapis.com/auth/cloud-platform.read-only',
          'https://www.googleapis.com/auth/ndev.clouddns.readonly',
          'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
        ],
      });
    
      // 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 dns.changes.list({
        // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
        managedZone: 'placeholder-value',
        // Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.
        maxResults: 'placeholder-value',
        // Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.
        pageToken: 'placeholder-value',
        // Identifies the project addressed by this request.
        project: 'placeholder-value',
        // Sorting criterion. The only supported value is change sequence.
        sortBy: 'placeholder-value',
        // Sorting order direction: 'ascending' or 'descending'.
        sortOrder: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "changes": [],
      //   "header": {},
      //   "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/dns.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 dns = google.dns('v1beta2');
    
    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/cloud-platform',
          'https://www.googleapis.com/auth/cloud-platform.read-only',
          'https://www.googleapis.com/auth/ndev.clouddns.readonly',
          'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
        ],
      });
    
      // 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 dns.changes.get({
        // The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.
        changeId: 'placeholder-value',
        // For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.
        clientOperationId: 'placeholder-value',
        // Identifies the managed zone addressed by this request. Can be the managed zone name or ID.
        managedZone: 'placeholder-value',
        // Identifies the project addressed by this request.
        project: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "additions": [],
      //   "deletions": [],
      //   "id": "my_id",
      //   "isServing": false,
      //   "kind": "my_kind",
      //   "startTime": "my_startTime",
      //   "status": "my_status"
      // }
    }
    
    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