gorush/vendor/github.com/appleboy/go-fcm
Bo-Yi Wu 14dc899b02 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>
2017-06-01 02:52:01 -05:00
..
LICENSE feat: check unused package (#232) 2017-06-01 02:52:01 -05:00
README.md feat: check unused package (#232) 2017-06-01 02:52:01 -05:00
client.go feat: check unused package (#232) 2017-06-01 02:52:01 -05:00
message.go feat: check unused package (#232) 2017-06-01 02:52:01 -05:00
option.go feat: check unused package (#232) 2017-06-01 02:52:01 -05:00
response.go feat: check unused package (#232) 2017-06-01 02:52:01 -05:00
retry.go feat: check unused package (#232) 2017-06-01 02:52:01 -05:00

README.md

go-fcm

GoDoc Build Status Go Report Card

This project was forked from github.com/edganiukov/fcmfcm.

Golang client library for Firebase Cloud Messaging. Implemented only HTTP client.

More information on Firebase Cloud Messaging

Getting Started

To install fcm, use go get:

go get github.com/appleboy/go-fcm

or govendor:

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:

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.