forked from nikoksr/notify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
38 lines (28 loc) · 857 Bytes
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
Package pushover implements a Pushover notifier, allowing messages to be sent to multiple recipients and supports
both users and groups.
Usage:
package main
import (
"context"
"github.com/nikoksr/notify"
"github.com/nikoksr/notify/service/pushover"
)
func main() {
notifier := notify.New()
// Provide your Pushover App token
pushoverService := pushover.New("APP_TOKEN")
// Pass user and/or group IDs for where to send the messages
pushoverService.AddReceivers("USER_ID", "GROUP_ID")
// Tell our notifier to use the Pushover service. You can repeat the above process
// for as many services as you like and just tell the notifier to use them.
notifier.UseServices(pushoverService)
// Send a message
_ = notifier.Send(
context.Background(),
"Hello!",
"I am a bot written in Go!",
)
}
*/
package pushover