The application serves as a platform for users to ask and answer questions, and, through membership and active participation, to vote questions and answers up or down similar to Reddit/Stack overflow and edit questions and answers. Users of application can earn reputation points and "badges" for example, a person is awarded 10 reputation points for receiving an "up" vote on a question or an answer to a question, and can receive badges for their valued contributions, which represents a gamification of the traditional Q&A website. Users unlock new privileges with an increase in reputation like the ability to vote, comment, and even edit other people's posts
- Login with bcrypt hashing.
- Access some resources using JWT token
- Allows to register.
- Allows User to ask a question.
- Allows User answer the question given the question id.
- Get all the questions using JWT Token
- Get answers for the particular question given the question id using JWT Auth
- Ability to upVote and downVote an particular question.
- Ability to upVote and downVote an particular question.
- Ability to Comment for particular question
- Ability to See post for a particular question with relevant answers and comments
- User badges -> Not implemented
post http://localhost:8080/register
Content-type: application/json
{
"registration_name": "mithun",
"username": "[email protected]",
"password": "somepwd"
}
post http://localhost:8080/login
Content-type: application/json
{
"username": "[email protected]",
"password": "hippo"
}
post http://localhost:8080/question
Content-type: application/json
{
"user_details": {
"username": "[email protected]",
"password": "suhasravifd07"
},
"question": {
"title":"javascript modules",
"body":"What are modules in javascript"
}
}
post http://localhost:8080/question/:qid/answer
Content-type: application/json
{
"user_details": {
"username": "[email protected]",
"password": "suhasravifd07"
},
"question": {
"question_id":102,
"answer":"You can use the following command => 'python -m pdb python-script.py'"
}
}
get http://localhost:8080/question/:qid
Authorization: Bearer "Token"
get http://localhost:8080/question/all
Authorization: Bearer "Token"
post http://localhost:8080/posts/:qid/upvote/question
Authorization: Bearer "Token"
post http://localhost:8080/posts/:qid/downvote/question
Authorization: Bearer "Token"
post http://localhost:8080/posts/:qid/upvote/answer
Authorization: Bearer "Token"
post http://localhost:8080/posts/:qid/downvote/answer
Authorization: Bearer "Token"
post http://localhost:8080/posts/:qid
Authorization: Bearer "Token"
post http://localhost:8080/posts/:qid/comment
Authorization: Bearer "Token"