2.0.20220808 • Published 2 years ago

@maxim_mazurok/gapi.client.cloudprofiler v2.0.20220808

Weekly downloads
53
License
MIT
Repository
github
Last release
2 years ago

TypeScript typings for Stackdriver Profiler API v2

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

Installing

Install typings for Stackdriver 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('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 Stackdriver Profiler API resources:

2.0.20220612

2 years ago

2.0.20220725

2 years ago

2.0.20220808

2 years ago

2.0.20220619

2 years ago

2.0.20220708

2 years ago

2.0.20220627

2 years ago

2.0.20220716

2 years ago

2.0.20220604

2 years ago

2.0.20220513

2 years ago

2.0.20220430

2 years ago

2.0.20220506

2 years ago

2.0.20220522

2 years ago

2.0.20220423

2 years ago

2.0.20220416

2 years ago

2.0.20220326

2 years ago

2.0.20220402

2 years ago

2.0.20220319

2 years ago

2.0.20220314

2 years ago

2.0.20220228

2 years ago

2.0.20220307

2 years ago

2.0.20220131

2 years ago

2.0.20220212

2 years ago

2.0.20211230

2 years ago

2.0.20220218

2 years ago

2.0.20220116

2 years ago

2.0.20220107

2 years ago

2.0.20220205

2 years ago

2.0.20220122

2 years ago

2.0.20211211

2 years ago

2.0.20211112

3 years ago

2.0.20211218

2 years ago

2.0.20211203

2 years ago

2.0.20211106

3 years ago

2.0.20211029

3 years ago

2.0.20211022

3 years ago

2.0.20211016

3 years ago

2.0.20210924

3 years ago

2.0.20210919

3 years ago

2.0.20210910

3 years ago

2.0.20210903

3 years ago

2.0.20210827

3 years ago

2.0.20210822

3 years ago

2.0.20210813

3 years ago

2.0.20210809

3 years ago

2.0.20210723

3 years ago

2.0.20210717

3 years ago

2.0.20210712

3 years ago

2.0.20210626

3 years ago

2.0.20210618

3 years ago

2.0.20210613

3 years ago

2.0.20210605

3 years ago

2.0.20210528

3 years ago

2.0.20210522

3 years ago

2.0.20210514

3 years ago

2.0.20210508

3 years ago

2.0.20210501

3 years ago

2.0.20210424

3 years ago

2.0.20210417

3 years ago

2.0.20210403

3 years ago

2.0.20210326

3 years ago

2.0.20210319

3 years ago

2.0.20210314

3 years ago

2.0.20210308

3 years ago

2.0.20210227

3 years ago

2.0.20210222

3 years ago

2.0.20210206

3 years ago

2.0.20210131

3 years ago

2.0.20210124

3 years ago

2.0.20210118

3 years ago

2.0.20210111

3 years ago

2.0.20201231

3 years ago

2.0.20201204

3 years ago

2.0.20201114

4 years ago

2.0.20201108

4 years ago