https://github.com/masaar/limp_gateway_fcm
LIMP Gateway for Firebase Cloud Messaging (FCM)
https://github.com/masaar/limp_gateway_fcm
fcm gateway limp
Last synced: about 1 year ago
JSON representation
LIMP Gateway for Firebase Cloud Messaging (FCM)
- Host: GitHub
- URL: https://github.com/masaar/limp_gateway_fcm
- Owner: masaar
- License: lgpl-3.0
- Created: 2019-11-02T16:47:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-26T13:15:53.000Z (over 6 years ago)
- Last Synced: 2025-06-04T19:55:19.521Z (about 1 year ago)
- Topics: fcm, gateway, limp
- Language: Python
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LIMP Gateway for Firebase Cloud Messaging (FCM)
This repo is a [LIMP](https://github.com/masaar/limp) [Package](https://github.com/masaar/limp-docs/blob/APIv5.8/api/package.md) for the sole purpose of integrating [FCM](https://firebase.google.com/docs/cloud-messaging) into LIMP apps using [LIMP Gateways](https://github.com/masaar/limp-docs/blob/APIv5.8/api/gateways.md).
## How-to
1. Clone this repo into your LIMP `modules` folder.
2. Add following to your app package config:
```python
'vars':{
'fcm':{'token':'YOUR_FCM_TOKEN_HERE'}
}
```
3. FCM gateway requires following args:
1. `registration_id`: Target device registration identifier. Type `str`.
2. `message_title`: Message title. Type `str`.
3. `message_body`: Message body. Type `str`.
4. `data_message`: Additional payload data to be sent with the message. Type `dict`.
4. FCM gateway accepts optional arg, namely `fcm_auth`, replicating `fcm` value in `vars Config Attr` for dynamic FCM API credentials.
5. Use FCM gateway using LIMP Gateway Controller:
```python
from gateway import Gateway
Gateway.send(gateway='fcm', registration_id=registration_id, message_title=message_title, message_body=message_body, data_message=data_message)
```