@maxim_mazurok/gapi.client.chromeuxreport
v1.0.20220811
Published
TypeScript typings for Chrome UX Report API v1
Downloads
15
Readme
TypeScript typings for Chrome UX Report API v1
The Chrome UX Report API lets you view real user experience data for millions of websites. For detailed description please check documentation.
Installing
Install typings for Chrome UX Report API:
npm install @types/gapi.client.chromeuxreport@v1 --save-dev
Usage
You need to initialize Google API client in your code:
gapi.load('client', () => {
// now we can use gapi.client
// ...
});
Then load api client wrapper:
gapi.client.load('chromeuxreport', 'v1', () => {
// now we can use gapi.client.chromeuxreport
// ...
});
After that you can use Chrome UX Report API resources:
/*
Queries the Chrome User Experience for a single `record` for a given site. Returns a `record` that contains one or more `metrics` corresponding to performance data about the requested site.
*/
await gapi.client.chromeuxreport.records.queryRecord({ });