Comments Application

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

Create Comment

{ "content": "string", "post_code": "string" // The unique code of the post to comment on }
{ "message": "Created comment succesfully." }

Get Comment by ID

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

Update Comment

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

Delete Comment

{ "message": "Comment deleted successfully!" }

Like Comment

{ "message": "You are now like/unlike <comment_content>." (depending on action) }

Get Comments for Post

{ "comments": [ # List of comments for the specified post ] }