SM-Service API is an API built with Python FastAPI, PostgreSQL, and SQLAlchemy. It serves as the backend infrastructure for a social media application.
/login(POST): Log in a user. Expects email and password.
/users(POST): Register a new user./users/{id}(GET, PUT, DELETE): Get, update, or delete a user profile./users/friends(GET): Get a list of user's friends./users/send_request/{friend_id}(POST): Send a friend request./users/respond_request/{request_id}(PUT): Respond to a friend request.
/posts(POST): Create a new post./posts/{id}(GET, PUT, DELETE): Get, update, or delete a post./posts/feed(GET): Get the user's news feed./posts/(GET): Get all user's posts.
/comments(POST): Add a comment to a post.comments/{id}(GET): Get a comment.comments/{id}(DELETE): Delete a comment.
/likes(POST): Like a post.
/messages(POST): Send a message./messages/{id}(DELETE): Delete a message./messages(GET): Get all messages for a user.