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/factchecktools.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 factchecktools = google.factchecktools('v1alpha1');
    
    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/userinfo.email'],
      });
    
      // 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 factchecktools.pages.update({
        // The name of this `ClaimReview` markup page resource, in the form of `pages/{page_id\}`. Except for update requests, this field is output-only and should not be set by the user.
        name: 'pages/my-page',
    
        // Request body metadata
        requestBody: {
          // request body parameters
          // {
          //   "claimReviewAuthor": {},
          //   "claimReviewMarkups": [],
          //   "name": "my_name",
          //   "pageUrl": "my_pageUrl",
          //   "publishDate": "my_publishDate",
          //   "versionId": "my_versionId"
          // }
        },
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "claimReviewAuthor": {},
      //   "claimReviewMarkups": [],
      //   "name": "my_name",
      //   "pageUrl": "my_pageUrl",
      //   "publishDate": "my_publishDate",
      //   "versionId": "my_versionId"
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/factchecktools.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 factchecktools = google.factchecktools('v1alpha1');
    
    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/userinfo.email'],
      });
    
      // 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 factchecktools.pages.delete({
        // The name of the resource to delete, in the form of `pages/{page_id\}`.
        name: 'pages/my-page',
      });
      console.log(res.data);
    
      // Example response
      // {}
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/factchecktools.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 factchecktools = google.factchecktools('v1alpha1');
    
    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/userinfo.email'],
      });
    
      // 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 factchecktools.pages.get({
        // The name of the resource to get, in the form of `pages/{page_id\}`.
        name: 'pages/my-page',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "claimReviewAuthor": {},
      //   "claimReviewMarkups": [],
      //   "name": "my_name",
      //   "pageUrl": "my_pageUrl",
      //   "publishDate": "my_publishDate",
      //   "versionId": "my_versionId"
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/factchecktools.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 factchecktools = google.factchecktools('v1alpha1');
    
    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/userinfo.email'],
      });
    
      // 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 factchecktools.pages.create({
        // Request body metadata
        requestBody: {
          // request body parameters
          // {
          //   "claimReviewAuthor": {},
          //   "claimReviewMarkups": [],
          //   "name": "my_name",
          //   "pageUrl": "my_pageUrl",
          //   "publishDate": "my_publishDate",
          //   "versionId": "my_versionId"
          // }
        },
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "claimReviewAuthor": {},
      //   "claimReviewMarkups": [],
      //   "name": "my_name",
      //   "pageUrl": "my_pageUrl",
      //   "publishDate": "my_publishDate",
      //   "versionId": "my_versionId"
      // }
    }
    
    main().catch(e => {
      console.error(e);
      throw e;
    });
    
    Docs
  • // Before running the sample:
    // - Enable the API at:
    //   https://console.developers.google.com/apis/api/factchecktools.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 factchecktools = google.factchecktools('v1alpha1');
    
    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/userinfo.email'],
      });
    
      // 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 factchecktools.pages.list({
        // An integer that specifies the current offset (that is, starting result location) in search results. This field is only considered if `page_token` is unset, and if the request is not for a specific URL. For example, 0 means to return results starting from the first matching result, and 10 means to return from the 11th result.
        offset: 'placeholder-value',
        // The organization for which we want to fetch markups for. For instance, "site.com". Cannot be specified along with an URL.
        organization: 'placeholder-value',
        // The pagination size. We will return up to that many results. Defaults to 10 if not set. Has no effect if a URL is requested.
        pageSize: 'placeholder-value',
        // The pagination token. You may provide the `next_page_token` returned from a previous List request, if any, in order to get the next page. All other fields must have the same values as in the previous request.
        pageToken: 'placeholder-value',
        // The URL from which to get `ClaimReview` markup. There will be at most one result. If markup is associated with a more canonical version of the URL provided, we will return that URL instead. Cannot be specified along with an organization.
        url: 'placeholder-value',
      });
      console.log(res.data);
    
      // Example response
      // {
      //   "claimReviewMarkupPages": [],
      //   "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