Skip to content

Commit

Permalink
docs: enhance notification API documentation and examples
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
  • Loading branch information
appleboy committed Jul 20, 2024
1 parent a7ca587 commit f5a49c0
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,25 @@ A push notification micro server using [Gin](https://github.com/gin-gonic/gin) f
- [FCM](https://firebase.google.com/)
- [HMS](https://developer.huawei.com/consumer/en/hms/)

[A live demo on Netlify](https://gorush.netlify.app/).
[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.

```bash
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"notifications": [
{
"tokens": [
"your_device_token"
],
"platform": 2,
"title": "Test Title",
"message": "Test Message"
}
]
}' \
https://gorush.netlify.app/api/push
```

## Features

Expand Down

0 comments on commit f5a49c0

Please sign in to comment.