Coder Social home page Coder Social logo

nadralia / ireporter_api Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 53 KB

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.

Python 100.00%

ireporter_api's Introduction

Build Status Coverage Status Maintainability

iReporter_Api

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.

Features

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

API Endpoints

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

Technologies used to build the application

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

Installation

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

How to run tests

Enter the command below in the terminal to run the tests with coverage using pytest

  python -m pytest tests/

Link to iReporter on Heroku

Author

Adralia Nelson

Acknowledgements

Big thanks to LFA's and fellow colleagues at Andela for reviewing the project and the guiding on the basic principles.

ireporter_api's People

Contributors

nadralia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.