This section describes the API endpoints for managing comments.
Base URL: /
Authentication:
Most API calls require authorization with a valid access token. You can obtain an access token by logging in with a username and password (refer to Accounts section).
{
"content": "string",
"post_code": "string" // The unique code of the post to comment on
}
{
"message": "Created comment succesfully."
}
<comment_id>
: The unique identifier of the comment to retrieve.{
"comment": {
"id": integer,
"content": "string",
"created": "string (date-time)",
"updated": "string (date-time)",
"author": {
"full_name": "string",
"username": "string",
"bio": "null|string",
"profile_image": "null|string",
"following_count": integer,
"follower_count": integer,
"is_follow": boolean,
"is_verify": boolean
},
"like_count": integer,
"is_like": boolean
}
}
<comment_id>
: The unique identifier of the comment to update.{
"content": "string" // The updated content of the comment
}
{
"updated_comment": {
"comment": {
"id": integer,
"content": "string",
"created": "string (date-time)",
"updated": "string (date-time)",
"author": {
"full_name": "string",
"username": "string",
"bio": "null|string",
"profile_image": "null|string",
"following_count": integer,
"follower_count": integer,
"is_follow": boolean,
"is_verify": boolean
},
"like_count": integer,
"is_like": boolean
}
}
}
<comment_id>
: The unique identifier of the comment to delete.{
"message": "Comment deleted successfully!"
}
<comment_id>
: The unique identifier of the comment to like/unlike.{
"message": "You are now like/unlike <comment_content>." (depending on action)
}
<post_code>
: The unique code of the post to retrieve comments for.{
"comments": [
# List of comments for the specified post
]
}