Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/junker/fcm
Common Lisp Client for FCM - Firebase Cloud Messaging
https://github.com/junker/fcm
common-lisp fcm fcm-notifications firebase firebase-fcm
Last synced: 10 days ago
JSON representation
Common Lisp Client for FCM - Firebase Cloud Messaging
- Host: GitHub
- URL: https://github.com/junker/fcm
- Owner: Junker
- License: mit
- Created: 2023-11-19T08:23:30.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-07-17T07:01:36.000Z (4 months ago)
- Last Synced: 2024-07-17T09:04:05.676Z (4 months ago)
- Topics: common-lisp, fcm, fcm-notifications, firebase, firebase-fcm
- Language: Common Lisp
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FCM
Common Lisp client for FCM - Firebase Cloud Messaging.
## Warning
This software is still ALPHA quality. The APIs will be likely to change.
## Installation
This system can be installed from [UltraLisp](https://ultralisp.org/) like this:
```common-lisp
(ql-dist:install-dist "http://dist.ultralisp.org/"
:prompt nil)
(ql:quickload "fcm")
```## Usage
```common-lisp
(defvar *fcm* (fcm:make-client-with-service-account "config/firebase.json"))
(defvar *token* "some-device-token")
(defvar *message*
(list :|token| *token*
:|notification| (list :|title| "Message Title"
:|body| "Message body"
:|image| "https://example.org/logo.jpg")))(handler-case (fcm:send *fcm* *message*)
(fcm:fcm-error (err)
(case (intern (fcm:fcm-error-status err))
('NOT_FOUND
(log:warn "unregistered FCM token: ~A" *token*))
(t
(log:error "FCM error: ~A: ~A; token: ~A" (type-of err) err *token*)))))```
## Documentation
- [FCM Message format](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages)