Ensure these are installed before continuing.
- Python 3.7 or Python 3.6
- Pipenv
safetynet is written in Python. To run safetynet for development:
git clone [email protected]:kochman/safetynet.git
cd safetynet
pipenv install --three
pipenv shell
python app.py
-
GET
/api/profiles
:Returns a JSON list of profiles that safetynet thinks this user is interested in. Right now, that's every profile, but eventually will be location-based.
-
POST
/api/profiles
:Create a new profile. The body should be a JSON object similar to the following:
{ "name": "Safetynet User", "latitude": 42.733011, "longitude": -73.667795, "status": "A freeform text field for users to provide information..." }
-
POST
/api/profiles/<id>
:Update an existing profile with a specific ID. This endpoint expects an object with two fields, i.e.:
{ "profile": <profile object>, "token": <token returned from `/api/profiles`> }
This will only succeed if the token matches the one generated by POSTing to
/api/profiles
.