|
|
@ -14,9 +14,10 @@ API abstraction for mojoio
|
|
|
|
[](https://david-dm.org/mojoio/slackme)
|
|
|
|
[](https://david-dm.org/mojoio/slackme)
|
|
|
|
[](https://www.bithound.io/github/mojoio/slackme/master/dependencies/npm)
|
|
|
|
[](https://www.bithound.io/github/mojoio/slackme/master/dependencies/npm)
|
|
|
|
[](https://www.bithound.io/github/mojoio/slackme)
|
|
|
|
[](https://www.bithound.io/github/mojoio/slackme)
|
|
|
|
|
|
|
|
[](https://snyk.io/test/npm/slackme)
|
|
|
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
|
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
|
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
|
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
|
|
[](http://standardjs.com/)
|
|
|
|
[](https://standardjs.com/)
|
|
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
## Usage
|
|
|
|
Use TypeScript for best in class instellisense.
|
|
|
|
Use TypeScript for best in class instellisense.
|
|
|
@ -31,7 +32,7 @@ mySlackme.sendMessage:{{
|
|
|
|
}, 'myAwesomeChannel'}
|
|
|
|
}, 'myAwesomeChannel'}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
The message interface looks like this:
|
|
|
|
The message interface follows [Slack's docs (click here)](https://api.slack.com/docs/message-formatting) and looks like this:
|
|
|
|
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
```javascript
|
|
|
|
interface IAttachmentField {
|
|
|
|
interface IAttachmentField {
|
|
|
@ -92,7 +93,6 @@ interface IMessageOptions {
|
|
|
|
Alternatively, there is the option of specifying a SlackMessage class
|
|
|
|
Alternatively, there is the option of specifying a SlackMessage class
|
|
|
|
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
```javascript
|
|
|
|
|
|
|
|
|
|
|
|
const mySlackMessage = new SlackMessage({ /* message options here } */, mySlackme)
|
|
|
|
const mySlackMessage = new SlackMessage({ /* message options here } */, mySlackme)
|
|
|
|
mySlackMessage.title = 'new Title' // modify message options
|
|
|
|
mySlackMessage.title = 'new Title' // modify message options
|
|
|
|
mySlackMessage.sendToRoom('general')
|
|
|
|
mySlackMessage.sendToRoom('general')
|
|
|
|