Giter Club home page Giter Club logo

fcm's Introduction

Golang FCM

Basic implementation of FCM (firebase cloud messaging) in Go. Only HTTP requests with JSON payload are supported. This package uses legacy HTTP API (pre-v1 API).

Documentation

https://godoc.org/github.com/tinode/fcm

Usage:

  client := fcm.NewClient(your_fcm_api_key)

  message := &fcm.HttpMessage{...initialize your message...}
  response := client.SendHttp(message)

The client is safe to use from multiple go routines at the same time. The client maintains a pool of HTTP connections. It recycles them as needed. Do not recreate client for every request because it's wasteful. SendHttp is a blocking call.

Sample code: https://github.com/tinode/chat/blob/master/server/push/fcm/push_fcm.go

Installation

go get github.com/tinode/fcm

fcm's People

Contributors

or-else avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.