0.0.20240502 • Published 14 days ago

@maxim_mazurok/gapi.client.cloudfunctions-v1 v0.0.20240502

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

TypeScript typings for Cloud Functions API v1

Manages lightweight user-provided functions executed in response to events. For detailed description please check documentation.

Installing

Install typings for Cloud Functions API:

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

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 Functions API resources:

/*
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
*/
await gapi.client.cloudfunctions.operations.get({name: 'name'});

/*
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
*/
await gapi.client.cloudfunctions.operations.list({});
0.0.20240502

14 days ago

0.0.20240425

21 days ago

0.0.20240418

28 days ago

0.0.20240411

1 month ago

0.0.20240321

2 months ago

0.0.20240315

2 months ago

0.0.20240307

2 months ago

0.0.20240229

3 months ago

0.0.20240222

3 months ago

0.0.20240220

3 months ago

0.0.20240207

3 months ago

0.0.20240205

3 months ago

0.0.20240118

4 months ago

0.0.20240112

4 months ago

0.0.20240104

4 months ago

0.0.20231207

5 months ago

0.0.20231130

6 months ago

0.0.20230810

9 months ago

0.0.20231109

6 months ago

0.0.20230928

8 months ago

0.0.20230921

8 months ago

0.0.20230723

10 months ago

0.0.20230803

10 months ago

0.0.20230727

10 months ago

0.0.20231023

7 months ago

0.0.20231102

7 months ago

0.0.20231026

7 months ago

0.0.20230710

10 months ago

0.0.20230914

8 months ago

0.0.20230713

10 months ago

0.0.20231012

7 months ago

0.0.20230907

8 months ago

0.0.20230904

9 months ago

0.0.20230629

11 months ago

0.0.20231005

7 months ago

0.0.20230622

11 months ago

0.0.20230619

11 months ago

0.0.20230518

12 months ago

0.0.20230515

1 year ago

0.0.20230608

11 months ago

0.0.20230601

12 months ago

0.0.20230524

12 months ago

0.0.20230504

1 year ago

0.0.20230427

1 year ago

0.0.20230415

1 year ago

0.0.20230323

1 year ago

0.0.20230320

1 year ago

0.0.20230420

1 year ago

0.0.20230309

1 year ago

0.0.20230406

1 year ago

0.0.20230307

1 year ago

0.0.20230330

1 year ago

0.0.20230206

1 year ago

0.0.20230126

1 year ago

0.0.20230202

1 year ago

0.0.20230221

1 year ago

0.0.20221103

2 years ago

0.0.20230105

1 year ago

0.0.20230119

1 year ago

0.0.20221110

2 years ago

0.0.20221229

1 year ago

0.0.20221207

1 year ago

0.0.20221129

1 year ago

0.0.20230112

1 year ago

0.0.20221020

2 years ago

0.0.20221027

2 years ago

0.0.20220921

2 years ago

0.0.20220818

2 years ago

0.0.20220908

2 years ago

0.0.20220901

2 years ago

0.0.20220824

2 years ago

0.0.20220811

2 years ago

0.0.20220805

2 years ago