Feed

Add a like to a post

post

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
post
POST /feed/like HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 49

{
  "postId": "550e8400-e29b-41d4-a716-446655440000"
}

No content

Remove a like from a post

delete

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
delete
DELETE /feed/like HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 49

{
  "postId": "550e8400-e29b-41d4-a716-446655440000"
}

No content

Add a comment to a post

post

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
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"
}

Remove a comment from a post

delete

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
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

Get post reaction totals

get

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
get
GET /feed/post-reactions/{postId} HTTP/1.1
Host: 
Accept: */*
{
  "likes": 123,
  "comments": 45,
  "shares": 10
}

Get post comments (paginated)

get

Retrieves comments for a specified post in a paginated manner.

Path parameters
postIdstring · uuidRequiredExample: 550e8400-e29b-41d4-a716-446655440000
Query parameters
pageintegerOptional

The page number to retrieve

Example: 1
pageSizeintegerOptional

The number of comments to retrieve per page

Example: 10
Responses
200
Comments retrieved successfully
application/json
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