Skip to content

Commit

Permalink
feat: generate samples (#2056)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith committed May 7, 2020
1 parent 9d612d7 commit ea599ac
Show file tree
Hide file tree
Showing 276 changed files with 462,026 additions and 63,508 deletions.
86 changes: 86 additions & 0 deletions src/apis/abusiveexperiencereport/v1.ts
Expand Up @@ -167,6 +167,55 @@ export namespace abusiveexperiencereport_v1 {
/**
* abusiveexperiencereport.sites.get
* @desc Gets a site's Abusive Experience Report summary.
* @example
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/abusiveexperiencereport.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 abusiveexperiencereport = google.abusiveexperiencereport('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: [],
* });
*
* // 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 abusiveexperiencereport.sites.get({
* // Required. The name of the site whose summary to get, e.g.
* // `sites/http%3A%2F%2Fwww.google.com%2F`.
* //
* // Format: `sites/{site}`
* name: 'sites/my-site',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "abusiveStatus": "my_abusiveStatus",
* // "enforcementTime": "my_enforcementTime",
* // "filterStatus": "my_filterStatus",
* // "lastChangeTime": "my_lastChangeTime",
* // "reportUrl": "my_reportUrl",
* // "reviewedSite": "my_reviewedSite",
* // "underReview": false
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* @alias abusiveexperiencereport.sites.get
* @memberOf! ()
*
Expand Down Expand Up @@ -257,6 +306,43 @@ export namespace abusiveexperiencereport_v1 {
/**
* abusiveexperiencereport.violatingSites.list
* @desc Lists sites that are failing in the Abusive Experience Report.
* @example
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/abusiveexperiencereport.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 abusiveexperiencereport = google.abusiveexperiencereport('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: [],
* });
*
* // 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 abusiveexperiencereport.violatingSites.list({});
* console.log(res.data);
*
* // Example response
* // {
* // "violatingSites": []
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* @alias abusiveexperiencereport.violatingSites.list
* @memberOf! ()
*
Expand Down
47 changes: 47 additions & 0 deletions src/apis/acceleratedmobilepageurl/v1.ts
Expand Up @@ -183,6 +183,53 @@ export namespace acceleratedmobilepageurl_v1 {
/**
* acceleratedmobilepageurl.ampUrls.batchGet
* @desc Returns AMP URL(s) and equivalent [AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format).
* @example
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/acceleratedmobilepageurl.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 acceleratedmobilepageurl = google.acceleratedmobilepageurl('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: [],
* });
*
* // 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 acceleratedmobilepageurl.ampUrls.batchGet({
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "lookupStrategy": "my_lookupStrategy",
* // "urls": []
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "ampUrls": [],
* // "urlErrors": []
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* @alias acceleratedmobilepageurl.ampUrls.batchGet
* @memberOf! ()
*
Expand Down

0 comments on commit ea599ac

Please sign in to comment.