{"id":17965055,"url":"https://github.com/tkyshm/pnsvc","last_synced_at":"2025-09-09T14:42:18.246Z","repository":{"id":80117594,"uuid":"165994158","full_name":"tkyshm/pnsvc","owner":"tkyshm","description":"Push Notification Service via FCM with Erlang/OTP.","archived":false,"fork":false,"pushed_at":"2019-09-17T02:10:19.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T07:42:17.300Z","etag":null,"topics":["apns","erlang","fcm","otp","push","webpush"],"latest_commit_sha":null,"homepage":null,"language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tkyshm.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-16T07:24:23.000Z","updated_at":"2019-03-27T08:21:05.000Z","dependencies_parsed_at":"2023-02-28T12:00:55.615Z","dependency_job_id":null,"html_url":"https://github.com/tkyshm/pnsvc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkyshm%2Fpnsvc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkyshm%2Fpnsvc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkyshm%2Fpnsvc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkyshm%2Fpnsvc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkyshm","download_url":"https://codeload.github.com/tkyshm/pnsvc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247069400,"owners_count":20878561,"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":["apns","erlang","fcm","otp","push","webpush"],"created_at":"2024-10-29T12:09:58.261Z","updated_at":"2025-04-03T19:40:39.907Z","avatar_url":"https://github.com/tkyshm.png","language":"Erlang","readme":"Push Notification Service (pnsvc)\n=====\n\n## Overview\n\nTBD\n\n## Usage\n\n```erlang\n1\u003e pnsvc:send(Request, GCPProjectId).\n\n{ok, 200, ...}\n```\n\n### About Request\n\n[FCM App Server Protocols HTTP v1 API.](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages?hl=ja)\n\n- for example(android)\n\n```erlang\n#{\n    message =\u003e #{\n        notification =\u003e #{\n            title =\u003e \u003c\u003c\"notification title\"/utf8\u003e\u003e,\n            body =\u003e \u003c\u003c\"notification body\"/utf8\u003e\u003e\n        },\n        token =\u003e \u003c\u003c\"fcm registration token\"\u003e\u003e,\n        android =\u003e #{\n            ttl =\u003e \"3600s\"\n        }\n    }\n}.\n```\n\n- for example(ios)\n\n```erlang\nTBD\n```\n\n- for example(webpush)\n\n```erlang\nTBD\n```\n\n### Push Notification test\n\n- curl\n```\n$ curl -XPOST -H 'Content-Type: application/json' \\\n    -d '{\"message\": \n            {\n                \"token\": \"dR1Xd5PcL...xuyntS\",\n                \"data\": {\n                    \"title\": \"notification title\",\n                    \"body\": \"notification body\",\n                    \"icon\": \"icon image\",\n                    \"badge\": \"icon image url displayed at the device status bar\"\n                }\n            }\n        }' http://localhost:5000/v1/projects/:project_id/send | jq .\n```\n\n`:project_id` is your firebase project id.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkyshm%2Fpnsvc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkyshm%2Fpnsvc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkyshm%2Fpnsvc/lists"}