Skip to content

kochman/safetynet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

safetynet

Requirements

Ensure these are installed before continuing.

Getting started

safetynet is written in Python. To run safetynet for development:

Installing

git clone [email protected]:kochman/safetynet.git
cd safetynet
pipenv install --three

Running

pipenv shell
python app.py

API endpoints

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published