0.0.20240513 • Published 6 days ago

@maxim_mazurok/gapi.client.cloudprofiler-v2 v0.0.20240513

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days ago

TypeScript typings for Cloud Profiler API v2

Manages continuous profiling information. For detailed description please check documentation.

Installing

Install typings for Cloud Profiler API:

npm install @types/gapi.client.cloudprofiler-v2 --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(
  'https://cloudprofiler.googleapis.com/$discovery/rest?version=v2',
  () => {
    // now we can use:
    // gapi.client.cloudprofiler
  }
);
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
gapi.client.load('cloudprofiler', 'v2', () => {
  // now we can use:
  // gapi.client.cloudprofiler
});

Don't forget to authenticate your client before sending any request to resources:

// declare client_id registered in Google Developers Console
var client_id = '',
  scope = [
    // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
    'https://www.googleapis.com/auth/cloud-platform',

    // View and write monitoring data for all of your Google and third-party Cloud and API projects
    'https://www.googleapis.com/auth/monitoring',

    // Publish metric data to your Google Cloud projects
    'https://www.googleapis.com/auth/monitoring.write',
  ],
  immediate = true;
// ...

gapi.auth.authorize(
  {client_id: client_id, scope: scope, immediate: immediate},
  authResult => {
    if (authResult && !authResult.error) {
      /* handle successful authorization */
    } else {
      /* handle authorization error */
    }
  }
);

After that you can use Cloud Profiler API resources:

0.0.20240513

6 days ago

0.0.20240506

14 days ago

0.0.20240429

20 days ago

0.0.20240423

26 days ago

0.0.20240331

2 months ago

0.0.20240325

2 months ago

0.0.20240317

2 months ago

0.0.20240311

2 months ago

0.0.20240305

2 months ago

0.0.20240219

3 months ago

0.0.20240122

4 months ago

0.0.20240101

5 months ago

0.0.20231213

5 months ago

0.0.20231205

6 months ago

0.0.20231127

6 months ago

0.0.20231106

7 months ago

0.0.20231009

7 months ago

0.0.20230731

10 months ago

0.0.20230710

10 months ago

0.0.20230716

10 months ago

0.0.20230911

8 months ago

0.0.20230813

9 months ago

0.0.20231030

7 months ago

0.0.20230806

10 months ago

0.0.20230821

9 months ago

0.0.20230924

8 months ago

0.0.20230724

10 months ago

0.0.20231023

7 months ago

0.0.20231001

8 months ago

0.0.20230612

11 months ago

0.0.20230515

1 year ago

0.0.20230521

12 months ago

0.0.20230429

1 year ago

0.0.20230507

1 year ago

0.0.20230416

1 year ago

0.0.20230403

1 year ago

0.0.20230227

1 year ago

0.0.20230327

1 year ago

0.0.20230424

1 year ago

0.0.20230306

1 year ago

0.0.20230130

1 year ago

0.0.20230213

1 year ago

0.0.20221031

2 years ago

0.0.20221114

2 years ago

0.0.20221212

1 year ago

0.0.20230109

1 year ago

0.0.20230102

1 year ago

0.0.20221107

2 years ago

0.0.20230123

1 year ago

0.0.20221017

2 years ago

0.0.20221024

2 years ago

0.0.20220926

2 years ago

0.0.20220819

2 years ago

0.0.20220910

2 years ago

0.0.20220904

2 years ago

0.0.20220827

2 years ago

0.0.20220813

2 years ago

0.0.20220808

2 years ago