StackOverflow-lite is a platform where people can ask questions and provide answers
- Users can post questions.
- Users can post answers.
- Users can view a question with answers to questions.
- Users can view all the answers
Clone the repository here
To test the UI:
Navigate to the UI directory
On your preferred browser, open index.html
To test the API:
Navigate to the API/ directory
In a virtual environment, perform the following:
git checkout feature
pip install -r requirements.txt
pytest tests/
python run.py
API HOSTED
Api are hosted here
https://stack-overflowlite.herokuapp.com
Pivotal link
https://www.pivotaltracker.com/n/projects/2189449
##Available endpoints
-
POST /api/v1/auth/signup/
:headers = {content_type:application/json} { "first_name": "John", "last_name" : "Doe", "email" : "johndoe@gmail.com", "password" : "testpassword" }
-
POST /api/v1/auth/login/
:headers = {content_type:application/json} { "username" : "Johnny", "password" : "johndoe1234" }
-
GET /api/v1/questions/
headers = {content_type:application/json}
-
GET /api/v1/questions/<questionId>/
headers = {content_type:application/json}
-
POST /api/v1/questions/
:headers = {content_type:application/json, Authorisation:Token <key>} { "question_subject": "Sample Title", "question_body" : "This is a sample description" }
-
DELETE /api/v1/questions/<questionId>/
:headers = {content_type:application/json, Authorisation:Token <key>}
-
POST /api/v1/questions/<questionId>/answers/
:headers = {content_type:application/json, Authorisation:Token <key>} { "answer": "This is the answer body" }
-
PUT /questions/<question_id>/answers/<answer_id>/
:headers = {content_type:application/json, Authorisation:Token <key>} { "vote":1 }
-
PUT /questions/<question_id>/answers/<answer_id>/
:headers = {content_type:application/json, Authorisation:Token <key>} { "answer":"This is an update to an answer" }