Slack Developer Kit for Node.js
Go to GitHub

IncomingWebhook

Kind: global class

new IncomingWebhook(slackUrl, defaults)

Param Type Description
slackUrl String  
defaults object  
defaults.username string The default username to use when sending a webhook. If no username is specified, the one chosen when creating the webhook will be used.
defaults.iconEmoji string The default emoji to use when sending a webhook. If no iconEmoji is specified, the one chosen when creating the webhook will be used.
defaults.channel string The default channel to use when sending a webhook. If no channel is specified, the one chosen when creating the webhook will be used.
defaults.text string The default text to use when sending a webhook.
defaults.linkNames string The default setting for the link_names format option to use when sending a webhook. If no value is specified, the one chosen when creating the webhook will be used.

incomingWebhook.send(message, [optCb])

Sends a message via an incoming webhook

Kind: instance method of [IncomingWebhook](#IncomingWebhook)

Param Type Description
message String | Object The message to send. Can be text or an object that overrides the defaults in initialization.
[optCb] function