Skip to content

Commit

Permalink
fix(pagespeedonline): update the API
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and sofisl committed Aug 8, 2023
1 parent cf32530 commit fb574b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 64 deletions.
6 changes: 3 additions & 3 deletions src/apis/pagespeedonline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"url": "https://github.com/googleapis/google-api-nodejs-client.git"
},
"engines": {
"node": ">=14.0.0"
"node": ">=12.0.0"
},
"scripts": {
"fix": "gts fix",
Expand All @@ -33,10 +33,10 @@
"devDependencies": {
"@microsoft/api-documenter": "^7.8.10",
"@microsoft/api-extractor": "^7.8.10",
"gts": "^5.0.0",
"gts": "^3.1.1",
"null-loader": "^4.0.0",
"ts-loader": "^9.0.0",
"typescript": "^5.1.6",
"typescript": "~4.8.4",
"webpack": "^5.0.0",
"webpack-cli": "^5.0.0"
}
Expand Down
61 changes: 0 additions & 61 deletions src/apis/pagespeedonline/v5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -804,67 +804,6 @@ export namespace pagespeedonline_v5 {

/**
* Runs PageSpeed analysis on the page at the specified URL, and returns PageSpeed scores, a list of suggestions to make that page faster, and other information.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/pagespeedonline.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 pagespeedonline = google.pagespeedonline('v5');
*
* 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: ['openid'],
* });
*
* // 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 pagespeedonline.pagespeedapi.runpagespeed({
* // The captcha token passed when filling out a captcha.
* captchaToken: 'placeholder-value',
* // A Lighthouse category to run; if none are given, only Performance category will be run
* category: 'placeholder-value',
* // The locale used to localize formatted results
* locale: '[a-zA-Z]+((_|-)[a-zA-Z]+)?',
* // The analysis strategy (desktop or mobile) to use, and desktop is the default
* strategy: 'placeholder-value',
* // Required. The URL to fetch and analyze
* url: '(?i)(url:|origin:)?http(s)?://.*',
* // Campaign name for analytics.
* utm_campaign: 'placeholder-value',
* // Campaign source for analytics.
* utm_source: 'placeholder-value',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "analysisUTCTimestamp": "my_analysisUTCTimestamp",
* // "captchaResult": "my_captchaResult",
* // "id": "my_id",
* // "kind": "my_kind",
* // "lighthouseResult": {},
* // "loadingExperience": {},
* // "originLoadingExperience": {},
* // "version": {}
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* ```
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
Expand Down

0 comments on commit fb574b4

Please sign in to comment.