{"id":26384538,"url":"https://github.com/douglasmakey/go-fcm","last_synced_at":"2025-03-17T07:29:35.377Z","repository":{"id":57495522,"uuid":"115879259","full_name":"douglasmakey/go-fcm","owner":"douglasmakey","description":"Firebase Cloud Messaging library written in Go","archived":false,"fork":false,"pushed_at":"2019-05-19T23:13:41.000Z","size":18,"stargazers_count":33,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-15T06:30:55.092Z","etag":null,"topics":["fcm","fcm-notifications","firebase","firebase-messaging","golang"],"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/douglasmakey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-31T18:22:59.000Z","updated_at":"2024-04-07T04:40:09.000Z","dependencies_parsed_at":"2022-08-28T17:33:22.452Z","dependency_job_id":null,"html_url":"https://github.com/douglasmakey/go-fcm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasmakey%2Fgo-fcm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasmakey%2Fgo-fcm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasmakey%2Fgo-fcm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasmakey%2Fgo-fcm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/douglasmakey","download_url":"https://codeload.github.com/douglasmakey/go-fcm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243991718,"owners_count":20380044,"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","fcm-notifications","firebase","firebase-messaging","golang"],"created_at":"2025-03-17T07:29:34.700Z","updated_at":"2025-03-17T07:29:35.363Z","avatar_url":"https://github.com/douglasmakey.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-fcm : FCM library in Go\n\n[![CircleCI](https://circleci.com/gh/douglasmakey/go-fcm.svg?style=svg)](https://circleci.com/gh/douglasmakey/go-fcm)\n[![Codecov]](https://codecov.io/gh/douglasmakey/go-fcm)\n\nFirebase Cloud Messaging ( FCM ) Library using golang ( Go )\n\nThis library uses HTTP/JSON Firebase Cloud Messaging connection server protocol\n\n## Usage\n\n```\ngo get github.com/douglasmakey/go-fcm\n```\n\n## Docs\n\n####  Firebase Cloud Messaging HTTP Protocol Specs\n```\nhttps://firebase.google.com/docs/cloud-messaging/http-server-ref\n```\n\n#### Firebase Cloud Messaging Developer docs\n```\nhttps://firebase.google.com/docs/cloud-messaging/\n```\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"github.com/douglasmakey/go-fcm\"\n\t)\n\nfunc main() {\n\t// init client\n\tclient := fcm.NewClient(\"ApiKey\")\n\t\n\t// You can use your HTTPClient \n\t//client.SetHTTPClient(client)\n\t\n\tdata := map[string]interface{}{\n\t\t\"message\": \"From Go-FCM\",\n\t\t\"details\": map[string]string{\n\t\t\t\"name\": \"Name\",\n\t\t\t\"user\": \"Admin\",\n\t\t\t\"thing\": \"none\",\n\t\t},\n\t}\n\t\n\t// You can use PushMultiple or PushSingle\n\tclient.PushMultiple([]string{\"token 1\", \"token 2\"}, data)\n\t//client.PushSingle(\"token 1\", data)\n\t\n\t// registrationIds remove and return map of invalid tokens\n\tbadRegistrations := client.CleanRegistrationIds()\n\tlog.Println(badRegistrations) \n\t\n\tstatus, err := client.Send()\n\tif err != nil {\n\t\tlog.Fatalf(\"error: %v\", err)\n\t}\n\t\n\tlog.Println(status.Results)\n}\n\n```\n[Codecov]: https://codecov.io/gh/douglasmakey/go-fcm/branch/master/graph/badge.svg","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglasmakey%2Fgo-fcm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdouglasmakey%2Fgo-fcm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglasmakey%2Fgo-fcm/lists"}