- 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
- Users can create an account and log in
- Users can create a red-flag record (An incident linked to corruption
- Users can create intervention record (a call for a government agency to intervene e.g repair bad road sections, collapsed bridges, flooding e.t.c)
- Users can edit their red-flag or intervention records
- Users can delete their red-flag or intervention records
- Users can add geolocation (Lat Long Coordinates) to their red-flag or intervention records
- Users can change the geolocation (Lat Long Coordinates) attached to their red-flag or intervention records
- Admin can change the status of a record to either under investigation, rejected (in the event of a false claim) or resolved (in the event that the claim has been investigated and resolved)
- Users can add images to their red-flag or intervention records, to support their claims
- Users can add videos to their red-flag or intervention records, to support their claims
- Clone the project from this [link]
- A computer with an operating system (Linux, MacOS or Windows can do the job) Python 3.7
- Pytest or any other preffered python tesing tool
- Postman to test the API endpoints
- A preffered text editor
- Git to keep track of the different project branches
- Clone the project from this [link]
- Open your terminal or command prompt for linux users
- $ cd IReporter_API
- $ virtualenv venv
- $ . venv/bin/activate
- $ git checkout develop
- $ pip install -r requirements.txt
- $ python run.py
- The API is hosted on Heroku. Use the [link] below to navigate to it.
- Run the command below to install pytest in your virtual environment
$ pip install pytest
- Run the tests
$ pytest -vv --cov
This is version one "v1" of the API
End Point | Functionality |
---|---|
POST api/v1/auth/login | Login to application |
POST api/v1/auth/signup | Register an account |
POST api/v1/red-flags | Create a red-flag |
GET api/v1/red-flags | Fetch all red-flags |
GET api/v1/red-flags/int:redflag_Id | Fetch a red-flag |
PATCH api/v1/red-flags/int:redflag_Idlocation | Edit red-flag location |
PATCH api/v1/red-flags/int:redflag_Idcomment | Edit red-flag comment |
POST api/v1/intervention | Create a intervention |
GET api/v1/intervention | Fetch all intervention |
GET api/v1/intervention/int:intervention_Id | Fetch a intervention |
PATCH api/v1/intervention/int:intervention_Idlocation | Edit intervention location |
PATCH api/v1/intervention/int:intervention_Idcomment | Edit intervention comment |
PATCH api/v1/red-flags/int:redflag_Idstatus | Edit red-flag status |
PATCH api/v1/intervention/int:intervention_Idstatus | Edit intervention status |
- Python 3.6.6 Flask (A python microframework)
Pylint
Pytest
Virtual environment
-
Matembu Emmanuel Dominic
-
Email : ematembu2@gmail.com
Acknowledgement to the Almighty God and Andela for making cohort 15/Andela 35 possible where cadidates are motivated.