0.0.20240504 • Published 2 days ago

@maxim_mazurok/gapi.client.trafficdirector-v2 v0.0.20240504

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

TypeScript typings for Traffic Director API v2

For detailed description please check documentation.

Installing

Install typings for Traffic Director API:

npm install @types/gapi.client.trafficdirector-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://trafficdirector.googleapis.com/$discovery/rest?version=v2',
  () => {
    // now we can use:
    // gapi.client.trafficdirector
  }
);
// 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('trafficdirector', 'v2', () => {
  // now we can use:
  // gapi.client.trafficdirector
});

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',
  ],
  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 Traffic Director API resources:

/*

*/
await gapi.client.trafficdirector.discovery.client_status({});
0.0.20240504

2 days ago

0.0.20240410

23 days ago

0.0.20240322

1 month ago

0.0.20240312

2 months ago

0.0.20240307

2 months ago

0.0.20240304

2 months ago

0.0.20240226

2 months ago

0.0.20240214

3 months ago

0.0.20240213

3 months ago

0.0.20240207

3 months ago

0.0.20240201

3 months ago

0.0.20240129

3 months ago

0.0.20240109

4 months ago

0.0.20240102

4 months ago

0.0.20231212

5 months ago

0.0.20231128

5 months ago

0.0.20230810

9 months ago

0.0.20230711

10 months ago

0.0.20231108

6 months ago

0.0.20230831

8 months ago

0.0.20230913

8 months ago

0.0.20230927

7 months ago

0.0.20231018

7 months ago

0.0.20230622

11 months ago

0.0.20230801

9 months ago

0.0.20230724

10 months ago

0.0.20231025

6 months ago

0.0.20231101

6 months ago

0.0.20230520

12 months ago

0.0.20230507

1 year ago

0.0.20230526

11 months ago

0.0.20230413

1 year ago

0.0.20230320

1 year ago

0.0.20230420

1 year ago

0.0.20230321

1 year ago

0.0.20230327

1 year ago

0.0.20230306

1 year ago

0.0.20230406

1 year ago

0.0.20230126

1 year ago

0.0.20230219

1 year ago

0.0.20221130

1 year ago

0.0.20221214

1 year ago

0.0.20221229

1 year ago

0.0.20221216

1 year ago

0.0.20221106

1 year ago

0.0.20220920

2 years ago

0.0.20221011

2 years ago

0.0.20220829

2 years ago

0.0.20220908

2 years ago

0.0.20220822

2 years ago

0.0.20220914

2 years ago

0.0.20220818

2 years ago

0.0.20220817

2 years ago

0.0.20220805

2 years ago