forked from appleboy/gorush
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
54 lines (54 loc) · 1.36 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// A push notification server using Gin framework written in Go (Golang).
//
// Details about the gorush project are found in github page:
//
// https://github.com/appleboy/gorush
//
// The pre-compiled binaries can be downloaded from release page.
//
// Send Android notification
//
// $ gorush -android -m="your message" --fcm-key="FCM Key Path" -t="Device token"
//
// Send iOS notification
//
// $ gorush -ios -m="your message" -i="API Key" -t="Device token"
//
// The default endpoint is APNs development. Please add -production flag for APNs production push endpoint.
//
// $ gorush -ios -m="your message" -i="API Key" -t="Device token" -production
//
// Run gorush web server
//
// $ gorush -c config.yml
//
// Get go status of api server using httpie tool:
//
// $ http -v --verify=no --json GET https://localhost:8088/api/stat/go
//
// Simple send iOS notification example, the platform value is 1:
//
// {
// "notifications": [
// {
// "tokens": ["token_a", "token_b"],
// "platform": 1,
// "message": "Hello World iOS!"
// }
// ]
// }
//
// Simple send Android notification example, the platform value is 2:
//
// {
// "notifications": [
// {
// "tokens": ["token_a", "token_b"],
// "platform": 2,
// "message": "Hello World Android!"
// }
// ]
// }
//
// For more details, see the documentation and example.
package main