Skip to content

Commit f5a49c0

Browse files
committed
docs: enhance notification API documentation and examples
- Update Netlify link description and add Firebase Cloud Messaging web link - Add example curl command for sending a notification via the API Signed-off-by: appleboy <appleboy.tw@gmail.com>
1 parent a7ca587 commit f5a49c0

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,25 @@ A push notification micro server using [Gin](https://github.com/gin-gonic/gin) f
6565
- [FCM](https://firebase.google.com/)
6666
- [HMS](https://developer.huawei.com/consumer/en/hms/)
6767

68-
[A live demo on Netlify](https://gorush.netlify.app/).
68+
[A live server on Netlify](https://gorush.netlify.app/) and get notification token on [Firebase Cloud Messaging web](https://fcm-demo-88b40.web.app/). You can use the token to send a notification to the device.
69+
70+
```bash
71+
curl -X POST \
72+
-H "Content-Type: application/json" \
73+
-d '{
74+
"notifications": [
75+
{
76+
"tokens": [
77+
"your_device_token"
78+
],
79+
"platform": 2,
80+
"title": "Test Title",
81+
"message": "Test Message"
82+
}
83+
]
84+
}' \
85+
https://gorush.netlify.app/api/push
86+
```
6987

7088
## Features
7189

0 commit comments

Comments
 (0)