Skip to content

Commit 487a4c0

Browse files
committed
docs: update readme to v0.1.0
1 parent 17a7f59 commit 487a4c0

1 file changed

Lines changed: 18 additions & 7 deletions

File tree

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
# notifier
2+
3+
![CI](https://github.com/moonD4rk/notifier/workflows/CI/badge.svg?branch=main)
4+
25
notifier is a simple Go library to send notification to other applications.
36

47
## Feature
58

69
| Provider | Code |
710
| ------------------------------------------------------------ | ------------------------------------------------------------ |
8-
| [DingTalk](https://www.dingtalk.com/en) | [provider/bark](https://github.com/moonD4rk/notifier/tree/main/provider/bark) |
9-
| [Bark](https://apps.apple.com/us/app/bark-customed-notifications/id1403753865) | [provider/dingtalk](https://github.com/moonD4rk/notifier/tree/main/provider/dingtalk) |
11+
| [DingTalk](https://www.dingtalk.com/en) | [provider/dingtalk](https://github.com/moonD4rk/notifier/tree/main/provider/dingtalk) |
12+
| [Bark](https://apps.apple.com/us/app/bark-customed-notifications/id1403753865) | [provider/bark](https://github.com/moonD4rk/notifier/tree/main/provider/bark) |
13+
| [Lark](https://www.larksuite.com/en_us/) | [provider/lark](https://github.com/moonD4rk/notifier/tree/main/provider/lark) |
14+
| [Feishu](https://www.feishu.cn/) | [provider/feishu](https://github.com/moonD4rk/notifier/tree/main/provider/feishu) |
1015

1116
## Install
1217

@@ -20,20 +25,27 @@ notifier is a simple Go library to send notification to other applications.
2025
package main
2126

2227
import (
28+
"os"
29+
2330
"github.com/moond4rk/notifier"
2431
)
2532

2633
func main() {
2734
var (
28-
dingtalkToken = "dingtalk_token"
29-
dingtalkSecret = "dingtalk_secret"
30-
barkKey = "bark_key"
35+
dingtalkToken = os.Getenv("dingtalk_token")
36+
dingtalkSecret = os.Getenv("dingtalk_secret")
37+
barkKey = os.Getenv("bark_key")
3138
barkServer = notifier.DefaultBarkServer
39+
feishuToken = os.Getenv("feishu_token")
40+
feishuSecret = os.Getenv("feishu_secret")
41+
larkToken = os.Getenv("feishu_token")
42+
larkSecret = os.Getenv("feishu_secret")
3243
)
33-
3444
notifier := notifier.New(
3545
notifier.WithDingTalk(dingtalkToken, dingtalkSecret),
3646
notifier.WithBark(barkKey, barkServer),
47+
notifier.WithFeishu(feishuToken, feishuSecret),
48+
notifier.WithLark(larkToken, larkSecret),
3749
)
3850

3951
var (
@@ -44,7 +56,6 @@ func main() {
4456
panic(err)
4557
}
4658
}
47-
4859
```
4960

5061
<img src="https://raw.githubusercontent.com/moonD4rk/staticfiles/master/picture/notifier-screenshot.png" width="480" align="left"/>

0 commit comments

Comments
 (0)