Skip to content

Platform where human beings can ask questions and provide answers to present questions

Notifications You must be signed in to change notification settings

mugoh/stackS-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stackS-api

Build Status Coverage Status Maintainability

Run in Postman

stackS is a platform where human beings can ask questions and provide answers to present questions.

What it can do

  • Users can create an account and log in.
  • Users can post questions.
  • Users can delete the questions they post.
  • Users can post answers.
  • Users can view the answers to questions.
  • Users can accept an answer out of all the answers to their question as the preferred answer.

API

Installation

  • Clone the repository
$ git clone https://github.com/hogum/stackS-api.git
  • Switch to the stackS directory
$ cd stackS-api
  • Depending on your os open your virtual enviroment
  • Install the project requirements
$ pip install -r requirements.txt

Running the application

$ export FLASK_APP=app

or

$ set FLASK_APP=app

on Windows OS

Start the server
$ flask run

Project Dependencies

Endpoints

Authorization Endpoints
Method Endpoint Functionality
POST api/v1/auth/register Register new User
POST api/v1/auth/login Login registered User
PUT api/v1/auth/users/user_id Update user details
DELETE api/v1/auth/users/user_id Delete a user account
GET api/v1/auth/users Get all registered users
GET api/v1/auth/users/user_id Get a single user
Questions Endpoints
Method Endpoint Functionality
POST /api/v1/questions Add a question
GET /api/v1/questions Lists all questions
GET /api/v1/questions/question_id Retrieve a question
PUT /api/v1/questions/question_id Edit a question of a logged in user
DELETE /api/v1/questions/question_id Delete a request of a logged in user
Answers Endpoints
Method Endpoint Functionality
POST /api/v1/questions/question_id/answers Add an answer
GET /api/v1/questions/question_id/answers Lists all answers
GET /api/v1/questions/question_id/answers/answerID Retrieve an answers
PUT /api/v1/questions/question_id/answer/answerID Edit an answer
DELETE /api/v1/questions/question_id/answer/answerID Delete an answer

About

Platform where human beings can ask questions and provide answers to present questions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published