iReporter enables any/every citizen to bring any form of corruption to the notice of appropriate authorities and the general public. Users can also report on things that needs government intervention
- python 3.7 -programming language that can be used on any mordern operating system
- Virtual environment -allows you to have an issolated evnvironment for your project where you can install all your dependencies
- Flask -a python framework for that can be used to add functionality to your API endpoints
create red-flag record
Enables user to create a red-flag recordGet all red-flags
Enables user to view all red-flag recordsGet all interventions
Enables user to view all intervention recordsGet single red-flag
Enables user to get a specific red-flag recordGet single intervention
Enables user to get a specific intervention recordupdate comment
Enables user to add a comment to a red-flag recordcreate new user
Enables users to create accountscreate login user
Enables users to access all the protected endpointsupdate location
Enables users to update specific red-flag and intervention locationdelete red-flag
Enables users to delete red-flag recordsdelete intervention
Enables users to delete intervention records
Clone the repository
$ https://github.com/frankopkusianwar/iReporter-challenge4.git
$ cd iReporter
Install virtualenv and create a virtual envirinment
$ pip install virtualenv
$ pip install virtualenvwrapper
$ virtualenv venv
$ source/venv/bin/activate
Install all the necessary dependencies
pip install -r requirements.txt
At the terminal or console type
python run.py
To run tests run this command at the console/terminal and add the test file name
pytest --cov
This API is versioned using url versioning starting, with the letter 'v'
This is version one"v1" of the API
End Point | Functionality |
---|---|
POST api/v1/red-flags | creates a new red-flag record |
GET api/v1/red-flags | get all red-flag records |
GET api/v1/red-flags/ | get a specific red-flag record |
PATCH api/v1/red-flags//comments | adds a comment to a red-flag record |
PATCH api/v1/red-flags//location | update red-flag record location |
POST api/v1/users | registers users |
DELETE GET api/v1/red-flags/ | delete red-flag record |
GET api/v1/interventions | get all intervention records |
GET api/v1/interventions/ | get a specific intervention record |
PATCH api/v1/interventions//comments | adds a comment to an intervention record |
PATCH api/v1/interventions//location | update intervention location |
- Okiror Frank
This app is open source and therefore is free to all users