API Documentation - bounswe/bounswe2022group4 GitHub Wiki
Link To The API and The Swagger Document: http://3.72.25.175:8080/swagger/
User Endpoints:
- GET /api/user/home
- POST /api/user/register
- POST /api/user/login
- POST /api/user/logout
- POST /api/user/forget_password
- POST /api/user/reset_password
- GET /api/user/profilepage/{username}
- PUT /api/user/profilepage/{username}
- POST /api/user/search/{keyword}
Chat Endpoints:
- POST /api/chat/send/message
- POST /api/chat/fetch/message
- GET /api/chat/fetch/users
Post Endpoints:
- POST /api/post/create-post
- POST /api/post/delete/{slug}
- POST /api/post/update/{slug}
- POST /api/post/upvote-post/{slug}
- POST /api/post/downvote-post/{slug}
- GET /api/post/fetch/{slug}
- GET /api/post/list-posts
- POST /api/post/search/{keyword}
- POST /api/post/create-comment/{slug}
- POST /api/post/delete-comment/{slug}/{id}
- POST /api/post/upvote-comment/{slug}/{id}
- POST /api/post/downvote-comment/{slug}/{id}
- POST /api/post/update-comment/{slug}/{id}
- GET /api/post/fetch-comment/{slug}/{id}
- GET /api/post/fetch-comments/{slug}
Example 1: Register to the Application
POST /api/user/register
Example 2: Login to the Application
POST /api/user/login
- From now on, we will use the token value returned in the response for all requests we will make to other endpoints of the application.
Example 3: Send Message to the Specific User with His/Her Username
POST /api/chat/send/message
- As I mentioned above, "Authorization: Token {Token Id}" HTTP header must be added all of the request.
Example 4: Get Secret Code In Order To Reset Password
POST /api/user/forget_password
- After this request an email which contains a secret code sent to your mail address. You should check the secret code.