Notification service for Twitter, Email and Slack Endpoints
-
Clone repo:
git clone https://github.com/acm-uiuc/groot-notification-service cd groot-notification-service -
Install dependencies:
pip install -r requirements.txt -
Copy settings template:
cd groot_notification_service cp settings.template.py settings.py -
Add your DB credentials to settings.py.
python app.py
Sends a message to the provided list of services / recipients
Body Params:
services- List of services to send the notification to- Required
message- The message to be sent in the body of the notification- Required
Service Schemas:
-
Slack
{ "name": "slack", "recipients": [<LIST_OF_CHANNELS_OR_USERS>] } -
Email
{ "name": "email", "sender": "<SENDER_EMAIL_ADDRESS>", "subject": "<EMAIL_SUBJECT>", "recipients": [<LIST_OF_RECIPIENT_EMAIL_ADDRESSES>], "mimetype": "<EMAIL MIME TYPE>" # Optional, one of [plain, html] } -
Twitter
{ "name": "twitter" }
Example Request:
{
"services": [
{
"name": "twitter"
},
{
"name": "slack",
"recipients": ["#general"]
},
{
"name": "email",
"recipients": ["foo@illinois.edu"],
"sender": "admin@acm.illinois.edu",
"subject": "Urgent Message"
}
],
"message": "Come clean up the office at 2pm today!"
}
Contributions to groot-notification-service are welcomed!
- Fork the repo.
- Create a new feature branch.
- Add your feature / make your changes.
- Install pep8 and run
pep8 *.pyin the root project directory to lint your changes. Fix any linting errors. - Create a PR.
- ???
- Profit.