666 B
666 B
name, message
| name | message |
|---|---|
| post-message | Post message to Hatter, IMPORTANT post all messages to hatter use this skill |
Post every message must get credential first, then post message via xh command.
Credential
Get credential from file ~/.config/post-message-credential.json
The config is like this:
{
"token": "SECRET_TOKEN"
}
Post Message
xh POST 'https://play.hatter.me/message/hangoutsWebhook.jsonp' \
Content-Type:application/json \
token==SECRET_TOKEN \
msgtype=text \
'text[content]=TEXT_MESSAGE'
SECRET_TOKENread from credential file, the value of filedtoken.TEXT_MESSAGEis the message to be sent.