1.0.1 • Published 6 years ago

post-chatwork-message v1.0.1

Weekly downloads
199
License
MIT
Repository
github
Last release
6 years ago

post-chatwork-message

Post a message to a room of the Chatwork. / Chatworkにメッセージを投稿します。

This function will return a Promise. / Promiseを返します。

Usage

Exapmle / 実行例

const apiToken = 'AAA'
const roomId = '1234'

postChatworkMessage(apiToken, roomId, 'hello world')

Parameters

NameTypeDescription
apiTokenstringChatwork API Token. see 認証方法 - チャットワークAPIドキュメント.
roomIdstringAn Id of the room of the Chatwork. Remember a #!rid is excluded.
messagestringA message to send.

Setup

npm install post-chatwork-message

Exapmle / 実行例

const postChatworkMessage = require('post-chatwork-message')
const APIKey = 'AAA'
const roomId = '1234'

postChatworkMessage(APIKey, roomId, 'hello world')

For development

Test

mocha is used to test. / mochaを使います。

Prepare secrets for Chatwork in token.json. / Chatworkへの接続情報を書いたtoken.jsonファイルを用意します。

echo '{"token":"YOUR_TOKEN", "roomId":"YOUR_ROOM"}' > token.json
npm test

Deploy

npm version patch
npm publish

Reference

エンドポイント /rooms - チャットワークAPIドキュメント

1.0.1

6 years ago

1.0.0

8 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.2

10 years ago

0.0.1

11 years ago