{"id":13414016,"url":"https://github.com/maddevsio/fcm","last_synced_at":"2025-07-10T06:07:29.986Z","repository":{"id":57480501,"uuid":"78189050","full_name":"maddevsio/fcm","owner":"maddevsio","description":"Firebase Cloud Messaging for application servers implemented using the Go programming language.","archived":false,"fork":false,"pushed_at":"2020-03-06T05:17:46.000Z","size":27,"stargazers_count":51,"open_issues_count":2,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-07T08:07:24.925Z","etag":null,"topics":["fcm","firebase","firebase-cloud-messaging"],"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/maddevsio.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-01-06T08:30:57.000Z","updated_at":"2023-08-27T19:26:42.000Z","dependencies_parsed_at":"2022-09-26T17:41:16.489Z","dependency_job_id":null,"html_url":"https://github.com/maddevsio/fcm","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/maddevsio/fcm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddevsio%2Ffcm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddevsio%2Ffcm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddevsio%2Ffcm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddevsio%2Ffcm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maddevsio","download_url":"https://codeload.github.com/maddevsio/fcm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddevsio%2Ffcm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264537605,"owners_count":23624422,"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"],"created_at":"2024-07-30T20:01:55.290Z","updated_at":"2025-07-10T06:07:29.964Z","avatar_url":"https://github.com/maddevsio.png","language":"Go","funding_links":[],"categories":["Go","Third-party APIs","第三方api","第三方API`第三方API 汇总`","第三方API","\u003cspan id=\"第三方api-third-party-apis\"\u003e第三方API Third-party APIs\u003c/span\u003e","Utility","第三方 APIs"],"sub_categories":["Utility/Miscellaneous","实用程序/Miscellaneous","HTTP Clients","查询语","Advanced Console UIs","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","高级控制台界面","Fail injection","高級控制台界面","交流"],"readme":"# Firebase Cloud Notifications Client\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/maddevsio/fcm)](https://goreportcard.com/report/github.com/maddevsio/fcm)\n[![Build Status](https://travis-ci.org/maddevsio/fcm.svg)](https://travis-ci.org/maddevsio/fcm.svg)[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php)\n[![](https://godoc.org/github.com/maddevsio/fcm?status.svg)](https://godoc.org/github.com/maddevsio/fcm)\n[![Coverage Status](https://coveralls.io/repos/github/maddevsio/fcm/badge.svg?branch=master)](https://coveralls.io/github/maddevsio/fcm?branch=master)\n\nFirebase Cloud Messaging for application servers implemented using the Go programming language.\nIt's designed for simple push notification sending via HTTP API\n\n# Getting started\n\nTo install fcm, use go get:\n\n```\ngo get gopkg.in/maddevsio/fcm.v1\n```\n\nImport fcm with the following:\n\n```\nimport \"gopkg.in/maddevsio/fcm.v1\"\n```\n\n# Sample usage\n\n```\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"gopkg.in/maddevsio/fcm.v1\"\n)\n\nfunc main() {\n\tdata := map[string]string{\n\t\t\"msg\": \"Hello World1\",\n\t\t\"sum\": \"Happy Day\",\n\t}\n\tc := fcm.NewFCM(\"serverKey\")\n\ttoken := \"token\"\n\tresponse, err := c.Send(fcm.Message{\n\t\tData:             data,\n\t\tRegistrationIDs:  []string{token},\n\t\tContentAvailable: true,\n\t\tPriority:         fcm.PriorityHigh,\n\t\tNotification: fcm.Notification{\n\t\t\tTitle: \"Hello\",\n\t\t\tBody:  \"World\",\n\t\t},\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Println(\"Status Code   :\", response.StatusCode)\n\tfmt.Println(\"Success       :\", response.Success)\n\tfmt.Println(\"Fail          :\", response.Fail)\n\tfmt.Println(\"Canonical_ids :\", response.CanonicalIDs)\n\tfmt.Println(\"Topic MsgId   :\", response.MsgID)\n}\n\n```\n\nMore examples can be found in /_examples/ directory\n\n# License\n\nMIT License\n\nCopyright (c) 2017 Mad Devs Developers\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaddevsio%2Ffcm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaddevsio%2Ffcm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaddevsio%2Ffcm/lists"}