0.0.20240425 • Published 7 days ago

@maxim_mazurok/gapi.client.tpu-v1 v0.0.20240425

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

TypeScript typings for Cloud TPU API v1

TPU API provides customers with access to Google TPU technology. For detailed description please check documentation.

Installing

Install typings for Cloud TPU API:

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

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 Cloud TPU API resources:

0.0.20240425

7 days ago

0.0.20240411

22 days ago

0.0.20240321

1 month ago

0.0.20240222

2 months ago

0.0.20240215

3 months ago

0.0.20240208

3 months ago

0.0.20240205

3 months ago

0.0.20240126

3 months ago

0.0.20240118

4 months ago

0.0.20240111

4 months ago

0.0.20240105

4 months ago

0.0.20240102

4 months ago

0.0.20231218

5 months ago

0.0.20231208

5 months ago

0.0.20231130

5 months ago

0.0.20230917

8 months ago

0.0.20230717

10 months ago

0.0.20230731

9 months ago

0.0.20230814

9 months ago

0.0.20231012

7 months ago

0.0.20231113

6 months ago

0.0.20230907

8 months ago

0.0.20230904

8 months ago

0.0.20230707

10 months ago

0.0.20230921

8 months ago

0.0.20230720

10 months ago

0.0.20231019

7 months ago

0.0.20230803

9 months ago

0.0.20231102

6 months ago

0.0.20231002

7 months ago

0.0.20231005

7 months ago

0.0.20231026

6 months ago

0.0.20230512

12 months ago

0.0.20230508

1 year ago

0.0.20230601

11 months ago

0.0.20230525

11 months ago

0.0.20230621

11 months ago

0.0.20230316

1 year ago

0.0.20230302

1 year ago

0.0.20230330

1 year ago

0.0.20230410

1 year ago

0.0.20230223

1 year ago

0.0.20230323

1 year ago

0.0.20230420

1 year ago

0.0.20230216

1 year ago

0.0.20230209

1 year ago

0.0.20230131

1 year ago

0.0.20221130

1 year ago

0.0.20230125

1 year ago

0.0.20221107

2 years ago

0.0.20230105

1 year ago

0.0.20221004

2 years ago

0.0.20221025

2 years ago

0.0.20220829

2 years ago

0.0.20220907

2 years ago

0.0.20220922

2 years ago

0.0.20220725

2 years ago