Skip to content

This is a StockOverFlow Lite api mock made during andela bootcamp for https://kiburualex.github.io/StackOverflow-Lite/UI/ hosted on https://kiburu-stacklyte-api-heroku.herokuapp.com/. It is implemented using Flask, FlastRestplus and Postgres

Notifications You must be signed in to change notification settings

kiburualex/StackOverFlowLiteApi

Repository files navigation

BUILD A PRODUCT: StackOverflow-lite API

Build Status Coverage Status

Introduction

  • An API for the StackOverFLow hosted here:). front end app.
  • StackOverFLowLite a platform where people can ask questions and provide answers. .

Technologies used.

Link to heroku:

https://kiburu-stacklyte-api-heroku.herokuapp.com/

Current endpoints

  • Ask a question.

    POST /api/v1/questions:

    headers = {content_type:application/json}
    
    {
        "id": 1,
        "title": "Build an API",
        "description": "How does one build an api",
        "user": "john doe",
        "answers": []
    }
    
  • Fetch all questions.

    GET /api/v1/questions

    headers = {content_type:application/json}
    
  • Fetch a specific question.

    GET /api/v1/questions/<id>

    headers = {content_type:application/json} 
    
  • Provide an answer to a question.

    POST /api/v1/questions/id/answer:

    headers = {content_type:application/json}
    
    {
        "id": 1,
        "answer": "Sample Answer",
        "user": "Leah"
    }
    
  • Delete a question.

    DELETE /api/v1/questions/id/:

    headers = {content_type:application/json}
    
    

Installation guide and usage

Clone the repo.

```
$ git clone https://kiburualex.github.io/StackOverflow-Lite/UI/
```

Create virtual environment & Activate.

```
$ virtualenv -p python3 venv 
$ source venv/bin/activate
```

Install Dependancies.

```
(myenv)$ pip install -r requirements.txt
```

Run the app

 (myenv)$ python run.py

Run Tests

(myenv)$ pytest --cov=tests

About

This is a StockOverFlow Lite api mock made during andela bootcamp for https://kiburualex.github.io/StackOverflow-Lite/UI/ hosted on https://kiburu-stacklyte-api-heroku.herokuapp.com/. It is implemented using Flask, FlastRestplus and Postgres

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages