Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stefanhans/quarantine-alert
https://github.com/stefanhans/quarantine-alert
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/stefanhans/quarantine-alert
- Owner: stefanhans
- License: mit
- Created: 2020-03-30T19:24:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-04T08:08:34.000Z (over 4 years ago)
- Last Synced: 2023-03-02T16:26:06.020Z (almost 2 years ago)
- Language: Go
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# quarantine-alert
### Backend
#### Developer
[Developer README](./DEVELOPER.md)
### Cloud Functions
---
Register```bash
URL:
https://europe-west3-quarantine-alert-22365.cloudfunctions.net/registerJSON:
reporter string : unique ID will be created by Firestore [ignored]
contagious bool : set to false as default [optional]
time-contagion-updated timestamp : set to current timestamp as default [optional]Examples:
curl https://europe-west3-quarantine-alert-22365.cloudfunctions.net/register -d '{}'curl https://europe-west3-quarantine-alert-22365.cloudfunctions.net/register -d '{"contagious":false}'
curl https://europe-west3-quarantine-alert-22365.cloudfunctions.net/register -d '{"contagious":true}'
curl https://europe-west3-quarantine-alert-22365.cloudfunctions.net/register \
-d '{"contagious":true,"time-contagion-updated":"2020-04-01T08:00:00+02:00"}'
curl https://europe-west3-quarantine-alert-22365.cloudfunctions.net/register \
-d '{"contagious":true,"time-contagion-updated":"2020-04-01T00:00:00Z"}'
curl https://europe-west3-quarantine-alert-22365.cloudfunctions.net/register \
-d '{"reporter":"","contagious":false,"time-contagion-updated":"2020-04-01T08:46:36.649207+02:00"}'
```---
Update```bash
URL:
https://europe-west3-quarantine-alert-22365.cloudfunctions.net/updateJSON:
reporter string: : unique ID has to match Firestore's Document ID [mandatory]
contagious bool : to be updated
time-contagion-updated timestamp : set to current timestamp as default [optional]Examples:
curl https://europe-west3-quarantine-alert-22365.cloudfunctions.net/update \
-d '{"reporter":"B3AQeB8acvRzK9FXtPxP","contagious":true}'```
---
Contacted
```bash
URL:
https://europe-west3-quarantine-alert-22365.cloudfunctions.net/contactedJSON:
reporter string : unique ID of reporting app has to match Firestore's Document ID
contact string : unique ID of contacted app
contact-time timestamp : set to current timestamp as default [optional]Examples:
curl https://europe-west3-quarantine-alert-22365.cloudfunctions.net/contacted \
-d '{"reporter":"B3AQeB8acvRzK9FXtPxP","contact":"HlUv5MfjBhbfvEtNfATR"}'
```---
Query```bash
URL:
https://europe-west3-quarantine-alert-22365.cloudfunctions.net/queryJSON:
requester string : unique ID of requester
contagious bool : set to false as default [ignored]
time-contagion-updated timestamp : set to current timestamp as default [ignored]Examples:
curl https://europe-west3-quarantine-alert-22365.cloudfunctions.net/query \
-d '{"requester":"uBAJbYDJTBHOVqrceZur"}'
```---
Dump```bash
URL:
https://europe-west3-quarantine-alert-22365.cloudfunctions.net/dumpJSON:
indent string : JSON data formatted with indent [default: false]Examples:
curl https://europe-west3-quarantine-alert-22365.cloudfunctions.net/dump -d '{}'
curl https://europe-west3-quarantine-alert-22365.cloudfunctions.net/dump -d '{"indent":true}'
curl https://europe-west3-quarantine-alert-22365.cloudfunctions.net/dump -d '{"indent":false}'
```