-
Notifications
You must be signed in to change notification settings - Fork 0
API Documentation
Register a new user account.
Request Body:
{
"username": "string",
"email": "string",
"password": "string"
}Response: Redirects to home page with session cookie
Authenticate a user.
Request Body:
{
"username": "string",
"password": "string"
}Response: Redirects to home page with session cookie
End user session.
Response: Redirects to home page, clears session cookie
Home page with post feed.
View a specific post and its comments.
Parameters:
-
postId(path) - UUID of the post
Create a new post.
Request Body:
{
"title": "string",
"content": "string",
"channel_id": "string",
"image": "file (optional)"
}Response: Redirects to new post
Edit an existing post.
Parameters:
-
postId(path) - UUID of the post
Request Body:
{
"title": "string",
"content": "string"
}Delete a post.
Parameters:
-
postId(path) - UUID of the post
Create a new comment.
Request Body:
{
"post_id": "string",
"content": "string"
}Edit a comment.
Parameters:
-
commentId(path) - UUID of the comment
Request Body:
{
"content": "string"
}Delete a comment.
Parameters:
-
commentId(path) - UUID of the comment
View a channel and its posts.
Parameters:
-
channelId(path) - UUID of the channel
Create a new channel.
Request Body:
{
"name": "string",
"description": "string",
"is_private": "boolean",
"image": "file (optional)"
}Join a channel.
Parameters:
-
channelId(path) - UUID of the channel
Leave a channel.
Parameters:
-
channelId(path) - UUID of the channel
Add or update a reaction.
Request Body:
{
"target_id": "string",
"target_type": "post|comment",
"reaction_type": "like|dislike"
}Remove a reaction.
Parameters:
-
reactionId(path) - UUID of the reaction
View user profile.
Parameters:
-
userId(path) - UUID of the user
Update user profile.
Request Body:
{
"email": "string (optional)",
"image": "file (optional)"
}Search posts, channels, and users.
Query Parameters:
-
q- Search query string
-
200 OK- Successful request -
302 Found- Redirect after successful operation -
400 Bad Request- Invalid input -
401 Unauthorized- Authentication required -
403 Forbidden- Insufficient permissions -
404 Not Found- Resource not found -
500 Internal Server Error- Server error
Currently not implemented. Consider adding for production use.
Sessions are managed via HTTP-only cookies. Include session cookie in requests to authenticated endpoints.