Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

amazon-archives/amazon-chime-webhooks-nodejs

Amazon Chime

Send Amazon Chime messages using webhooks.

const Chime = require('chime');

(async () => {
  try {
    await Chime.sendMessage('hello world', '<WEBHOOK_URL>');
  } catch (err) {
    // do something with err
  }
})();

Class: Chime

Added in: v1.0.0

new Chime(url[, options])

Added in: v1.0.0

  • url <string> - Webhook URL
  • options <object> Overridden by room.sendMessage() options.
    • markdown <boolean> - Send message using markdown syntax. Default: true
  • Returns: <Chime>
const room = new Chime('<WEBHOOK_URL>');

Chime.sendMessage(message, url[, options])

Added in: v1.0.0

  • message <string>
  • url <string> - Webhook URL
  • options <object>
    • markdown <boolean> - Send message using markdown syntax. Default: true
  • Returns: <Promise<object>>
    • messageId <string>
    • roomId <string>

Sends message.

const result = await Chime.sendMessage('hello world', '<WEBHOOK_URL>');

console.log(result);
// Prints something like:
// {
//   messageId: '1d048345-443a-4ad7-8247-69cf95bc5b73',
//   roomId: '3a5be182-197c-4b48-8efe-0c6d3a0f24b1'
// }

room.sendMessage(message[, options])

Added in: v1.0.0

  • message <string>
  • options <object>
    • markdown <boolean> - Send message using markdown syntax.
  • Returns: <Promise<object>>
    • messageId <string>
    • roomId <string>

Sends message.

const result = await room.sendMessage('hello world');

console.log(result);
// Prints something like:
// {
//   messageId: '1d048345-443a-4ad7-8247-69cf95bc5b73',
//   roomId: '3a5be182-197c-4b48-8efe-0c6d3a0f24b1'
// }

Contributions

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

About

Send Amazon Chime messages using webhooks.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published