2.0.20220805 • Published 2 years ago

@maxim_mazurok/gapi.client.cloudfunctions v2.0.20220805

Weekly downloads
113
License
MIT
Repository
github
Last release
2 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

2 years ago

2.0.20220609

2 years ago

2.0.20220726

2 years ago

2.0.20220622

2 years ago

2.0.20220707

2 years ago

2.0.20220720

2 years ago

2.0.20220714

2 years ago

2.0.20220602

2 years ago

2.0.20220525

2 years ago

2.0.20220511

2 years ago

2.0.20220509

2 years ago

2.0.20220428

2 years ago

2.0.20220520

2 years ago

1.0.20220421

2 years ago

1.0.20220317

2 years ago

1.0.20220324

2 years ago

1.0.20220413

2 years ago

1.0.20220331

2 years ago

1.0.20220303

2 years ago

1.0.20220224

2 years ago

1.0.20220218

2 years ago

1.0.20220105

2 years ago

1.0.20220113

2 years ago

1.0.20220118

2 years ago

1.0.20220203

2 years ago

1.0.20220127

2 years ago

1.0.20211130

2 years ago

1.0.20211111

3 years ago

1.0.20211108

3 years ago

1.0.20211206

2 years ago

1.0.20211027

3 years ago

1.0.20211021

3 years ago

1.0.20211014

3 years ago

1.0.20210929

3 years ago

1.0.20210923

3 years ago

1.0.20210916

3 years ago

1.0.20210907

3 years ago

1.0.20210825

3 years ago

1.0.20210819

3 years ago

1.0.20210812

3 years ago

1.0.20210805

3 years ago

1.0.20210726

3 years ago

1.0.20210715

3 years ago

1.0.20210708

3 years ago

1.0.20210624

3 years ago

1.0.20210621

3 years ago

1.0.20210610

3 years ago

1.0.20210602

3 years ago

1.0.20210528

3 years ago

1.0.20210519

3 years ago

1.0.20210513

3 years ago

1.0.20210506

3 years ago

1.0.20210427

3 years ago

1.0.20210422

3 years ago

1.0.20210415

3 years ago

1.0.20210409

3 years ago

1.0.20210325

3 years ago

1.0.20210318

3 years ago

1.0.20210309

3 years ago

1.0.20210308

3 years ago

1.0.20210302

3 years ago

1.0.20210225

3 years ago

1.0.20210218

3 years ago

1.0.20210211

3 years ago

1.0.20210131

3 years ago

1.0.20210128

3 years ago

1.0.20210121

3 years ago

1.0.20210114

3 years ago

1.0.20210107

3 years ago

1.0.20201203

3 years ago

1.0.20201201

3 years ago

1.0.20201107

4 years ago