Feed
Adds a like to a specified post. Requires user authentication.
550e8400-e29b-41d4-a716-446655440000
Like successfully added to the post
No content
Unauthorized - Invalid token or insufficient permissions
Not Found - The post with the specified ID does not exist
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.
550e8400-e29b-41d4-a716-446655440000
No Content - Like successfully removed from the post
No content
Unauthorized - Invalid token or insufficient permissions
Not Found - The post with the specified ID does not exist
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.
550e8400-e29b-41d4-a716-446655440000
This is a comment.
Comment successfully added to the post
Unauthorized - Invalid token or insufficient permissions
Not Found - The post with the specified ID does not exist
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.
550e8400-e29b-41d4-a716-446655440000
123e4567-e89b-12d3-a456-426614174000
No Content - Comment successfully removed from the post
No content
Unauthorized - Invalid token or insufficient permissions
Not Found - The comment or post with the specified ID does not exist
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.
550e8400-e29b-41d4-a716-446655440000
Reaction totals retrieved successfully
Not Found - The post with the specified ID does not exist
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.
550e8400-e29b-41d4-a716-446655440000
The page number to retrieve
1
The number of comments to retrieve per page
10
Comments retrieved successfully
Not Found - The post with the specified ID does not exist
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