Corruption is a huge bane to Africa’s development. African countries must develop novel and localised solutions that will curb this menace, hence the birth of iReporter. 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.
- Create a red-flag record
- Get all red-flag records
- Get a specific red-flag record.
- Edit a specific red-flag record.
- Delete a red-flag record.
Methods | EndPoint | Functionality | Access |
---|---|---|---|
POST | /api/v1/auth/signup | Sign up a user | PUBLIC |
POST | /api/v1/auth/login | Login a user | PUBLIC |
POST | /api/v1/red-flags | Create a red-flag record a user | PRIVATE |
GET | /api/v1/red-flags | Fetch all red-flag records. | PRIVATE |
GET | /api/v1/red-flags/redflag_id | Fetch a specific red-flag-record | PRIVATE |
PATCH | /api/v1/red-flags/redflag_id/location | Edit the location of a specific red-flag record | PRIVATE |
PATCH | /api/v1/red-flags/redflag_id/comment | Edit the comment of a specific red-flag record | PRIVATE |
DELETE | /api/v1/red-flags/redflag_id | Delete a specific red flag record. | PRIVATE |
Getting started with the app
Python3
- A programming language that lets us work more quickly.Flask
- A microframework for Python based on Werkzeug, Jinja 2 and good intentions.Virtualenv
- A tool to create an isolated virtual environment.Git
- Version Control System for tracking your changes.
Create a new directory and initialize git in it. Clone this repository by running
git clone https://github.com/nadralia/iReporter_Api
Create a virtual environment. For example, with virtualenv, create a virtual environment named venv using
virtualenv venv
Activate the virtual environment
cd venv/scripts/activate
Install the dependencies in the requirements.txt file using pip
pip install -r requirements.txt
Start the application by running
python run.py
Enter the command below in the terminal to run the tests with coverage using pytest
python -m pytest tests/
Adralia Nelson
Big thanks to LFA's and fellow colleagues at Andela for reviewing the project and the guiding on the basic principles.