README
View Source
LarkCustomBot
A simple package to send custom bot webhook message with signature to Lark.
Installation
By adding lark_custom_bot
to your list of dependencies in mix.exs
:
def deps do
[
{:lark_custom_bot, "~> 0.1"}
]
end
Usage
Caller
LarkCustomBot.call(webhook_url, secret, card_params)
# or
LarkCustomBot.call(card, config \\ config)
# which config is a keyword list,
# or by set them in config.exs
config :lark_custom_bot,
secret: "secret",
url: "webhook_url"
Card Params
Just simply support 2 type cards:
- Text
%{
type: :text,
text: "your text",
at_all: "optional boolean"
}
- Post
%{
type: :post,
locale: "zh_cn or en_us",
title: "optional",
at_all: "optional boolean",
content: [
%{tag: "a or text", text: "your text", herf: "optional for tag - text"}
]
}