feat: check unused package (#232)
* feat: check unused package update edganiukov/fcm to appleboy/go-fcm * update readme Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * update comment Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
64
vendor/github.com/appleboy/go-fcm/README.md
generated
vendored
Normal file
64
vendor/github.com/appleboy/go-fcm/README.md
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
# go-fcm
|
||||
|
||||
[](https://godoc.org/github.com/edganiukov/fcm)
|
||||
[](https://travis-ci.org/edganiukov/fcm)
|
||||
[](https://goreportcard.com/report/github.com/edganiukov/fcm)
|
||||
|
||||
This project was forked from [github.com/edganiukov/fcmfcm](https://github.com/edganiukov/fcm).
|
||||
|
||||
Golang client library for Firebase Cloud Messaging. Implemented only [HTTP client](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream).
|
||||
|
||||
More information on [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/)
|
||||
|
||||
## Getting Started
|
||||
|
||||
To install fcm, use `go get`:
|
||||
|
||||
```bash
|
||||
go get github.com/appleboy/go-fcm
|
||||
```
|
||||
|
||||
or `govendor`:
|
||||
|
||||
```bash
|
||||
govendor fetch github.com/appleboy/go-fcm
|
||||
```
|
||||
|
||||
or other tool for vendoring.
|
||||
|
||||
## Sample Usage
|
||||
|
||||
Here is a simple example illustrating how to use FCM library:
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/edganiukov/fcm"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Create the message to be sent.
|
||||
msg := &fcm.Message{
|
||||
Token: "sample_device_token",
|
||||
Data: map[string]interface{}{
|
||||
"foo": "bar",
|
||||
}
|
||||
}
|
||||
|
||||
// Create a FCM client to send the message.
|
||||
client := fcm.NewClient("sample_api_key")
|
||||
|
||||
// Send the message and receive the response without retries.
|
||||
response, err := client.Send(msg)
|
||||
if err != nil {
|
||||
/* ... */
|
||||
}
|
||||
/* ... */
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
#### TODO:
|
||||
---------
|
||||
- [ ] Retry only failed messages while multicast messaging.
|
||||
Reference in New Issue
Block a user