stackS is a platform where human beings can ask questions and provide answers to present questions.
- 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.
- 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
$ export FLASK_APP=app
or
$ set FLASK_APP=app
on Windows OS
$ flask run
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 |
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 |
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 |