0.0.20240430 • Published 3 days ago

@maxim_mazurok/gapi.client.pubsub-v1beta2 v0.0.20240430

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

TypeScript typings for Cloud Pub/Sub API v1beta2

Provides reliable, many-to-many, asynchronous messaging between applications. For detailed description please check documentation.

Installing

Install typings for Cloud Pub/Sub API:

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

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',

    // View and manage Pub/Sub topics and subscriptions
    'https://www.googleapis.com/auth/pubsub',
  ],
  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 Pub/Sub API resources:

0.0.20240430

3 days ago

0.0.20240423

10 days ago

0.0.20240409

24 days ago

0.0.20240416

18 days ago

0.0.20240319

2 months ago

0.0.20240312

2 months ago

0.0.20240305

2 months ago

0.0.20240227

2 months ago

0.0.20240220

3 months ago

0.0.20240208

3 months ago

0.0.20240201

3 months ago

0.0.20240126

3 months ago

0.0.20240122

4 months ago

0.0.20240109

4 months ago

0.0.20240102

4 months ago

0.0.20231226

4 months ago

0.0.20231212

5 months ago

0.0.20231211

5 months ago

0.0.20231205

5 months ago

0.0.20231128

5 months ago

0.0.20231107

6 months ago

0.0.20230928

7 months ago

0.0.20230921

8 months ago

0.0.20231019

7 months ago

0.0.20230801

9 months ago

0.0.20230725

9 months ago

0.0.20231024

6 months ago

0.0.20231104

6 months ago

0.0.20230718

10 months ago

0.0.20230711

10 months ago

0.0.20230830

8 months ago

0.0.20230912

8 months ago

0.0.20231010

7 months ago

0.0.20230905

8 months ago

0.0.20230627

10 months ago

0.0.20231121

5 months ago

0.0.20231003

7 months ago

0.0.20230620

11 months ago

0.0.20230613

11 months ago

0.0.20230516

12 months ago

0.0.20230509

12 months ago

0.0.20230425

1 year ago

0.0.20230523

12 months ago

0.0.20230606

11 months ago

0.0.20230529

11 months ago

0.0.20230505

1 year ago

0.0.20230418

1 year ago

0.0.20230317

1 year ago

0.0.20230224

1 year ago

0.0.20230321

1 year ago

0.0.20230404

1 year ago

0.0.20230328

1 year ago

0.0.20230306

1 year ago

0.0.20230329

1 year ago

0.0.20230307

1 year ago

0.0.20230411

1 year ago

0.0.20230214

1 year ago

0.0.20230218

1 year ago

0.0.20230124

1 year ago

0.0.20230131

1 year ago

0.0.20221226

1 year ago

0.0.20221201

1 year ago

0.0.20221101

2 years ago

0.0.20221122

1 year ago

0.0.20230119

1 year ago

0.0.20230102

1 year ago

0.0.20221206

1 year ago

0.0.20230112

1 year ago

0.0.20221020

2 years ago

0.0.20221028

2 years ago

0.0.20220926

2 years ago

0.0.20220829

2 years ago

0.0.20220920

2 years ago

0.0.20220912

2 years ago

0.0.20220824

2 years ago

0.0.20220904

2 years ago

0.0.20220816

2 years ago

0.0.20220808

2 years ago

0.0.20220729

2 years ago