2.0.20220805 • Published 3 years ago

@maxim_mazurok/gapi.client.cloudfunctions v2.0.20220805

Weekly downloads
113
License
MIT
Repository
github
Last release
3 years ago

TypeScript typings for Cloud Functions API v2

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@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('cloudfunctions', 'v2', () => {
  // 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:

2.0.20220805

3 years ago

2.0.20220609

3 years ago

2.0.20220726

3 years ago

2.0.20220622

3 years ago

2.0.20220707

3 years ago

2.0.20220720

3 years ago

2.0.20220714

3 years ago

2.0.20220602

3 years ago

2.0.20220525

3 years ago

2.0.20220511

3 years ago

2.0.20220509

3 years ago

2.0.20220428

3 years ago

2.0.20220520

3 years ago

1.0.20220421

3 years ago

1.0.20220317

3 years ago

1.0.20220324

3 years ago

1.0.20220413

3 years ago

1.0.20220331

3 years ago

1.0.20220303

3 years ago

1.0.20220224

3 years ago

1.0.20220218

3 years ago

1.0.20220105

3 years ago

1.0.20220113

3 years ago

1.0.20220118

3 years ago

1.0.20220203

3 years ago

1.0.20220127

3 years ago

1.0.20211130

4 years ago

1.0.20211111

4 years ago

1.0.20211108

4 years ago

1.0.20211206

4 years ago

1.0.20211027

4 years ago

1.0.20211021

4 years ago

1.0.20211014

4 years ago

1.0.20210929

4 years ago

1.0.20210923

4 years ago

1.0.20210916

4 years ago

1.0.20210907

4 years ago

1.0.20210825

4 years ago

1.0.20210819

4 years ago

1.0.20210812

4 years ago

1.0.20210805

4 years ago

1.0.20210726

4 years ago

1.0.20210715

4 years ago

1.0.20210708

4 years ago

1.0.20210624

4 years ago

1.0.20210621

4 years ago

1.0.20210610

4 years ago

1.0.20210602

4 years ago

1.0.20210528

4 years ago

1.0.20210519

4 years ago

1.0.20210513

4 years ago

1.0.20210506

4 years ago

1.0.20210427

4 years ago

1.0.20210422

4 years ago

1.0.20210415

4 years ago

1.0.20210409

4 years ago

1.0.20210325

4 years ago

1.0.20210318

4 years ago

1.0.20210309

4 years ago

1.0.20210308

4 years ago

1.0.20210302

4 years ago

1.0.20210225

4 years ago

1.0.20210218

4 years ago

1.0.20210211

4 years ago

1.0.20210131

4 years ago

1.0.20210128

4 years ago

1.0.20210121

4 years ago

1.0.20210114

4 years ago

1.0.20210107

4 years ago

1.0.20201203

5 years ago

1.0.20201201

5 years ago

1.0.20201107

5 years ago