{"id":20000136,"url":"https://github.com/rb-go/go-fcm","last_synced_at":"2025-03-01T23:40:51.551Z","repository":{"id":57495209,"uuid":"174190945","full_name":"rb-go/go-fcm","owner":"rb-go","description":"Optimized Firebase Cloud Messaging Package for Golang","archived":false,"fork":false,"pushed_at":"2019-12-18T06:30:03.000Z","size":32,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-12T12:52:19.992Z","etag":null,"topics":["fcm","firebase","firebase-cloud-messaging","golang","google"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rb-go.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"patreon":"riftbit","custom":["https://paypal.me/riftbit"]}},"created_at":"2019-03-06T17:35:47.000Z","updated_at":"2022-06-05T14:11:33.000Z","dependencies_parsed_at":"2022-08-31T12:51:38.672Z","dependency_job_id":null,"html_url":"https://github.com/rb-go/go-fcm","commit_stats":null,"previous_names":["riftbit/go-fcm","rb-pkg/gofcm","riftbit/gofcm"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rb-go%2Fgo-fcm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rb-go%2Fgo-fcm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rb-go%2Fgo-fcm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rb-go%2Fgo-fcm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rb-go","download_url":"https://codeload.github.com/rb-go/go-fcm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241439470,"owners_count":19963095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fcm","firebase","firebase-cloud-messaging","golang","google"],"created_at":"2024-11-13T05:13:53.846Z","updated_at":"2025-03-01T23:40:51.513Z","avatar_url":"https://github.com/rb-go.png","language":"Go","funding_links":["https://patreon.com/riftbit","https://paypal.me/riftbit"],"categories":[],"sub_categories":[],"readme":"# gofcm\n(in beta but works in production :) )\n\n[![GoDoc](https://godoc.org/github.com/riftbit/gofcm?status.svg)](https://godoc.org/github.com/riftbit/gofcm)\n[![Go Report Card](https://goreportcard.com/badge/github.com/riftbit/gofcm)](https://goreportcard.com/report/github.com/riftbit/gofcm)\n\nThis project basicly was forked from [github.com/appleboy/go-fcm](https://github.com/appleboy/go-fcm).\n\n## Difference with appleboy package\n\n* [x] Go modules with semantic versioning\n* [x] valyala/fasthttp client instead of net/http\n* [x] mailru/easyjson client instead of encoding/json\n* [x] Send() returns original body ([]byte) too (if FCM answer changed you can parse by yourself and not wait for package update)\n* [x] Some optimizations \n\nGolang client library for Firebase Cloud Messaging. Implemented only [HTTP client](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream).\n\nMore information on [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/)\n\n## Feature\n\n* [x] Send messages to a topic\n* [x] Send messages to a device list\n* [x] Supports condition attribute (fcm only)\n\n## Getting Started\n\nTo install gofcm, use `go get`:\n\n```bash\ngo get github.com/riftbit/gofcm\n```\n\n## Sample Usage\n\nHere is a simple example illustrating how to use FCM library:\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/riftbit/gofcm\"\n)\n\nfunc main() {\n\t// Create the message to be sent.\n\tmsg := \u0026fcm.Message{\n\t\tTo: \"sample_device_token\",\n\t\tData: map[string]interface{}{\n\t\t\t\"foo\": \"bar\",\n\t\t},\n\t}\n\n\t// Create a FCM client to send the message.\n\tclient, err := fcm.NewClient(\"sample_api_key\")\n\tif err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\n\t// Send the message and receive the response without retries.\n\tresponse, body, err := client.Send(msg)\n\tif err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\n\tlog.Printf(\"%#v\\n\", response)\n\tlog.Printf(\"%#v\\n\", body)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frb-go%2Fgo-fcm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frb-go%2Fgo-fcm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frb-go%2Fgo-fcm/lists"}