1.0.20220805 • Published 2 years ago

@maxim_mazurok/gapi.client.chat v1.0.20220805

Weekly downloads
133
License
MIT
Repository
github
Last release
2 years ago

TypeScript typings for Google Chat API v1

Enables apps to fetch information and perform actions in Google Chat. Authentication is a prerequisite for using the Google Chat REST API. For detailed description please check documentation.

Installing

Install typings for Google Chat API:

npm install @types/gapi.client.chat@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('chat', 'v1', () => {
  // now we can use gapi.client.chat
  // ...
});

After that you can use Google Chat API resources:

/*
Legacy path for creating message. Calling these will result in a BadRequest response.
*/
await gapi.client.chat.dms.messages({ parent: "parent",  });

/*
Legacy path for creating message. Calling these will result in a BadRequest response.
*/
await gapi.client.chat.dms.webhooks({ parent: "parent",  });

/*
Downloads media. Download is supported on the URI `/v1/media/{+name}?alt=media`.
*/
await gapi.client.chat.media.download({ resourceName: "resourceName",  });

/*
Legacy path for creating message. Calling these will result in a BadRequest response.
*/
await gapi.client.chat.rooms.messages({ parent: "parent",  });

/*
Legacy path for creating message. Calling these will result in a BadRequest response.
*/
await gapi.client.chat.rooms.webhooks({ parent: "parent",  });

/*
Returns a space. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).
*/
await gapi.client.chat.spaces.get({ name: "name",  });

/*
Lists spaces the caller is a member of. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).
*/
await gapi.client.chat.spaces.list({  });

/*
Legacy path for creating message. Calling these will result in a BadRequest response.
*/
await gapi.client.chat.spaces.webhooks({ parent: "parent",  });
1.0.20220619

2 years ago

1.0.20220612

2 years ago

1.0.20220622

2 years ago

1.0.20220805

2 years ago

1.0.20220706

2 years ago

1.0.20220701

2 years ago

1.0.20220708

2 years ago

1.0.20220716

2 years ago

1.0.20220713

2 years ago

1.0.20220720

2 years ago

1.0.20220608

2 years ago

1.0.20220727

2 years ago

1.0.20220722

2 years ago

1.0.20220730

2 years ago

1.0.20220506

2 years ago

1.0.20220511

2 years ago

1.0.20220513

2 years ago

1.0.20220520

2 years ago

1.0.20220527

2 years ago

1.0.20220525

2 years ago

1.0.20220429

2 years ago

1.0.20220427

2 years ago

1.0.20220604

2 years ago

1.0.20220409

2 years ago

1.0.20220405

2 years ago

1.0.20220406

2 years ago

1.0.20220415

2 years ago

1.0.20220422

2 years ago

1.0.20220420

2 years ago

1.0.20220319

2 years ago

1.0.20220323

2 years ago

1.0.20220329

2 years ago

1.0.20220326

2 years ago

1.0.20220223

2 years ago

1.0.20220302

2 years ago

1.0.20220308

2 years ago

1.0.20220309

2 years ago

1.0.20220312

2 years ago

1.0.20220218

2 years ago

1.0.20220216

2 years ago

1.0.20211229

2 years ago

1.0.20220105

2 years ago

1.0.20220107

2 years ago

1.0.20220116

2 years ago

1.0.20220126

2 years ago

1.0.20220125

2 years ago

1.0.20220209

2 years ago

1.0.20220207

2 years ago

1.0.20220129

2 years ago

1.0.20211225

2 years ago

1.0.20211110

3 years ago

1.0.20211117

2 years ago

1.0.20211112

3 years ago

1.0.20211206

2 years ago

1.0.20211125

2 years ago

1.0.20211215

2 years ago

1.0.20211211

2 years ago

1.0.20211106

3 years ago

1.0.20211218

2 years ago

1.0.20211029

3 years ago

1.0.20211020

3 years ago

1.0.20211015

3 years ago

1.0.20211006

3 years ago

1.0.20211008

3 years ago

1.0.20211002

3 years ago

1.0.20210925

3 years ago

1.0.20210922

3 years ago

1.0.20210920

3 years ago

1.0.20210911

3 years ago

1.0.20210903

3 years ago

1.0.20210827

3 years ago

1.0.20210822

3 years ago

1.0.20210818

3 years ago

1.0.20210814

3 years ago

1.0.20210811

3 years ago

1.0.20210806

3 years ago

1.0.20210731

3 years ago

1.0.20210723

3 years ago

1.0.20210721

3 years ago

1.0.20210717

3 years ago

1.0.20210714

3 years ago

1.0.20210709

3 years ago

1.0.20210707

3 years ago

1.0.20210630

3 years ago

1.0.20210626

3 years ago

1.0.20210623

3 years ago

1.0.20210618

3 years ago

1.0.20210613

3 years ago

1.0.20210609

3 years ago

1.0.20210605

3 years ago

1.0.20210602

3 years ago

1.0.20210528

3 years ago

1.0.20210522

3 years ago

1.0.20210514

3 years ago

1.0.20210508

3 years ago

1.0.20210505

3 years ago

1.0.20210501

3 years ago

1.0.20210428

3 years ago

1.0.20210424

3 years ago

1.0.20210421

3 years ago

1.0.20210417

3 years ago

1.0.20210413

3 years ago

1.0.20210407

3 years ago

1.0.20210403

3 years ago

1.0.20210326

3 years ago

1.0.20210324

3 years ago

1.0.20210317

3 years ago

1.0.20210314

3 years ago

1.0.20210307

3 years ago

1.0.20210303

3 years ago

1.0.20210227

3 years ago

1.0.20210224

3 years ago

1.0.20210219

3 years ago

1.0.20210217

3 years ago

1.0.20210211

3 years ago

1.0.20210206

3 years ago

1.0.20210203

3 years ago

1.0.20210131

3 years ago

1.0.20210127

3 years ago

1.0.20210120

3 years ago

1.0.20210116

3 years ago

1.0.20210109

3 years ago

1.0.20210106

3 years ago

1.0.20201231

3 years ago

1.0.20201211

3 years ago

1.0.20201202

3 years ago

1.0.20201127

3 years ago

1.0.20201118

3 years ago

1.0.20201114

4 years ago

1.0.20201111

4 years ago

1.0.20201110

4 years ago