forked from nikoksr/notify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
40 lines (29 loc) · 772 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
39
40
/*
Package whatsapp provides message notification integration for WhatsApp.
Usage:
package main
import (
"log"
"github.com/nikoksr/notify"
"github.com/nikoksr/notify/service/whatsapp"
)
func main() {
whatsappSvc, err := whatsapp.New()
if err != nil {
log.Fatalf("whatsapp.New() failed: %s", err.Error())
}
err = whatsappSvc.LoginWithQRCode()
if err != nil {
log.Fatalf("whatsappSvc.LoginWithQRCode() failed: %s", err.Error())
}
whatsappSvc.AddReceivers("Contact1")
notifier := notify.New()
notifier.UseServices(whatsappSvc)
err = notifier.Send(context.Background(), "subject", "message")
if err != nil {
log.Fatalf("notifier.Send() failed: %s", err.Error())
}
log.Println("notification sent")
}
*/
package whatsapp