Welcome to the User section where you can perform all the functionalities as an authenticated user.
The request body needs to be in JSON Format
Get all Existing Users
GET /api/v1/users
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
View your own Profile
GET /api/v1/users/profile
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
Follow a User
GET /api/v1/users/following/:id
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
ID of the user you want to follow
yes
Unfollow a User
GET /api/v1/users/un-follow/:id
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
ID of the user you want to unfollow
yes
Block a User
GET /api/v1/users/blocked/:id
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
ID of the user you want to block
yes
Unblock a User
GET /api/v1/users/un-blocked/:id
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
ID of the user you want to unblock
yes
Update your Profile
PUT /api/v1/users
Example Request
{"firsname": "your first name","lastname": "your last name","email": "your email address","password": "your password"}
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
Yes
firstname
string
Your firstname
optional
lastname
string
Your lastname
optional
email
string
Your email
optional
password
string
Your password
optional
View other users
GET /api/v1/users/profile-viewers/:id
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
ID of the user you want to view his profile
yes
Update your password
PUT /api/v1/users/update-password
Example Request
{"password": "your password"}
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
Upload profile picture
POST /api/v1/users/profile-photo-upload
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
profile
string
Your profile photo
yes
Close your account
DELETE /api/v1/users
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
Admin block Account
PUT /api/v1/users/admin-block/:id
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
ID of the user admin want to block
yes
Admin unblock Account
PUT /api/v1/users/admin-unblock/:id
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
ID of the user admin want to unblock
yes
Post
Welcome to the Post section where you can perform all the necessary functions related to Post.
The request body needs to be in Form-Data
Create Post
POST /api/v1/posts
Example Request
{"title": "title of the post","description": "description of the post","category": "id of the category you want your post to be the part of","postImage": "upload photo"}
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
title
string
title of the post
yes
description
string
description of the post
yes
category
string
ID of the category
yes
postImage
string
image of the post
yes
Get all Posts
GET /api/v1/posts
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
View a Particular Post
GET /api/v1/posts/:id
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
ID of the post you want to view
yes
Toggle like on a Post
GET /api/v1/posts/likes/:id
Parmaeters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
ID of the post you want to like
yes
Toggle dislike on a Post
GET /api/v1/posts/dislikes/:id
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
ID of the post you want to dislike
yes
Update your Post
PUT /api/v1/posts/:id
Example Request
{"title": "title of the post","description": "description of the post","category": "id of the category you want your post to be the part of","postImage": "upload photo"}
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
ID of the post you want to update
yes
title
string
title of the post
optional
description
string
description of the post
optional
category
string
ID of the category
optional
postImage
string
image of the post
optional
Delete a Post
DELETE /api/v1/posts/:id
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
ID of the post you want to delete
yes
Cateogory
Welcome to the Cateogry section where you can perform all the necessary functions related to Cateogry.
Create a new Cateogory
POST /api/v1/categories
Example Request
{"title": "category title"}
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
title
string
title of the category
yes
Get all Categories
GET /api/v1/categories
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
Get a particular Category
GET /api/v1/categories/:id
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
ID of the category you want to get
yes
Update a Category
PUT /api/v1/categories/:id
Example Request
{"title": "category title"}
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
ID of the category you want to edit
yes
title
string
title of the category
yes
Delete a Category
DELETE /api/v1/categories/:id
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
ID of the category you want to edit
yes
Comments
Welcome to the Comments section where you can perform all the functionalities related to comments.
Create a new Comment
POST /api/v1/comments/:id
Example Request
{"description": "your comment"}
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
Update a Comment
PUT /api/v1/comments/:id
Example Request
{"description": "your comment"}
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
id of the comment you want to edit
yes
description
string
description of the comment
yes
Delete a Comment
DELETE /api/v1/comments/:id
Parameters Required
Parameter
Type
Description
Required
authentication
string
Your token
yes
id
string
id of the comment you want to edit
yes
Collaboration
If you want to contribute in this project, then, feel free to reach me at [email protected]