Skip to content

harshpyati/qasite-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QASITE APIs

This project was created just to study more about building REST based apis in Jersey framework in Java

QASITE is "stackoverflow" clone with minimal features as of now.

Apis Available

1. Authentication

  • POST /user/signup :- to create a user
  • POST /user/login :- to login to the site
  • GET /user/:id :- to get user details
  • PUT /user/:id :- to update the user details
  • DELETE /user/:id :- to delete the user

2. Posting Questions and Answers

  • POST /questions :- add a question(requires auth)
  • PUT /questions/:id :- edit the question(requires auth)
  • DELETE /questions/:id :- delete a question(requires auth)
  • GET /questions :- fetches all questions
  • GET /questions/:id :- fetches question by question id
  • GET /questions/author/:authorId :- fetches question by particular author
  • PATCH /questions/:id/vote?direction=-1/1 :- upvote or downvote a question, -1 for downvote and 1 for upvote

  • POST /questions/:id/answer :- answer a question(requires auth)
  • PUT /questions/:id/answer/:answerId :- edit the answer(requires auth)
  • DELETE /questions/:id/answer/:id :- delete the answer(requires auth)
  • GET /questions/:id/answers :- fetches all answers to question id = id
  • GET /questions/:id/answers :- fetches answer to a question by id
  • GET /questions/author/:id/answers :- fetches answers by particular author
  • PATCH /questions/:id/answer/:answerId/vote?direction=-1/1 :- upvote or downvote an answer, -1 for downvote and 1 for upvote

Additional Features Planned

  • Posting answer and allowing upvote/downvote on questions/answers only if the user has certain reputations(points)
  • Statistics reporting for the user

Will update the db setup with details soon

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages