Feed
Adds a like to a specified post. Requires user authentication.
Body
postIdstring · uuidOptionalExample:
550e8400-e29b-41d4-a716-446655440000
Responses
200
Like successfully added to the post
401
Unauthorized - Invalid token or insufficient permissions
404
Not Found - The post with the specified ID does not exist
post
POST /feed/like HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 49
{
"postId": "550e8400-e29b-41d4-a716-446655440000"
}
No content
Removes a like from a specified post. Requires user authentication.
Body
postIdstring · uuidOptionalExample:
550e8400-e29b-41d4-a716-446655440000
Responses
204
No Content - Like successfully removed from the post
401
Unauthorized - Invalid token or insufficient permissions
404
Not Found - The post with the specified ID does not exist
delete
DELETE /feed/like HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 49
{
"postId": "550e8400-e29b-41d4-a716-446655440000"
}
No content
Adds a comment to a specified post. Requires user authentication.
Body
postIdstring · uuidOptionalExample:
550e8400-e29b-41d4-a716-446655440000
commentTextstringOptionalExample:
This is a comment.
Responses
200
Comment successfully added to the post
application/json
401
Unauthorized - Invalid token or insufficient permissions
404
Not Found - The post with the specified ID does not exist
post
POST /feed/comment HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 84
{
"postId": "550e8400-e29b-41d4-a716-446655440000",
"commentText": "This is a comment."
}
{
"commentId": "123e4567-e89b-12d3-a456-426614174000",
"postId": "550e8400-e29b-41d4-a716-446655440000",
"userId": "789e1234-e89b-12d3-a456-426614174000",
"commentText": "This is a comment.",
"createdAt": "2023-08-27T14:30:00Z",
"updatedAt": "2023-08-27T15:00:00Z"
}
Removes a comment from a specified post. Requires user authentication.
Body
postIdstring · uuidOptionalExample:
550e8400-e29b-41d4-a716-446655440000
commentIdstring · uuidOptionalExample:
123e4567-e89b-12d3-a456-426614174000
Responses
204
No Content - Comment successfully removed from the post
401
Unauthorized - Invalid token or insufficient permissions
404
Not Found - The comment or post with the specified ID does not exist
delete
DELETE /feed/comment HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 100
{
"postId": "550e8400-e29b-41d4-a716-446655440000",
"commentId": "123e4567-e89b-12d3-a456-426614174000"
}
No content
Retrieves the total number of reactions (likes, etc.) for a specified post.
Path parameters
postIdstring · uuidRequiredExample:
550e8400-e29b-41d4-a716-446655440000
Responses
200
Reaction totals retrieved successfully
application/json
404
Not Found - The post with the specified ID does not exist
get
GET /feed/post-reactions/{postId} HTTP/1.1
Host:
Accept: */*
{
"likes": 123,
"comments": 45,
"shares": 10
}
Retrieves comments for a specified post in a paginated manner.
Path parameters
postIdstring · uuidRequiredExample:
550e8400-e29b-41d4-a716-446655440000
Query parameters
pageintegerOptionalExample:
The page number to retrieve
1
pageSizeintegerOptionalExample:
The number of comments to retrieve per page
10
Responses
200
Comments retrieved successfully
application/json
404
Not Found - The post with the specified ID does not exist
get
GET /feed/post-comments/{postId} HTTP/1.1
Host:
Accept: */*
{
"totalComments": 45,
"comments": [
{
"commentId": "123e4567-e89b-12d3-a456-426614174000",
"postId": "550e8400-e29b-41d4-a716-446655440000",
"userId": "789e1234-e89b-12d3-a456-426614174000",
"commentText": "This is a comment.",
"createdAt": "2023-08-27T14:30:00Z",
"updatedAt": "2023-08-27T15:00:00Z"
}
]
}
Last updated