1.0.20220725 • Published 2 years ago

@maxim_mazurok/gapi.client.tpu v1.0.20220725

Weekly downloads
28
License
MIT
Repository
github
Last release
2 years 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('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:

1.0.20220714

2 years ago

1.0.20220629

2 years ago

1.0.20220725

2 years ago

1.0.20220520

2 years ago

1.0.20220426

2 years ago

1.0.20220412

2 years ago

1.0.20220301

2 years ago

1.0.20220214

2 years ago

1.0.20220105

2 years ago

1.0.20211115

2 years ago

1.0.20211213

2 years ago

1.0.20211108

3 years ago

1.0.20211101

3 years ago

1.0.20211021

3 years ago

1.0.20210915

3 years ago

1.0.20210824

3 years ago

1.0.20210816

3 years ago

1.0.20210721

3 years ago

1.0.20210707

3 years ago

1.0.20210510

3 years ago

1.0.20210505

3 years ago

1.0.20210423

3 years ago

1.0.20210419

3 years ago

1.0.20210414

3 years ago

1.0.20210401

3 years ago

1.0.20210217

3 years ago

1.0.20201023

3 years ago