post-service

module
v0.0.0-...-76c6153 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2025 License: MIT

README

post-service

Please note that the main code under development is in the dev branch

API Docs

/api/v1 - base uri
Query parameters are in [ ]

Headers:

  • Authorization: Bearer <ACCESS_TOKEN>

Designations:

  • [AUTH] - requires auth
  • [PUB] - doesn't require auth

/posts:

  • [AUTH] POST -> /uploadImage - upload image for post

  • [AUTH] POST -> / - create a post

  • [AUTH] GET -> /my - get posts

  • [AUTH] GET -> /my/notValidated - get not validated posts yet

  • [PUB] GET -> /author/:<userID> - get :userID's posts

  • [AUTH] GET -> /liked - get user liked posts

  • [AUTH] GET -> /trending [hours, limit] - get trending posts

  • [AUTH] GET -> /search [q, limit, offset]

  • [AUTH] PATCH -> /edit - edit post

  • [PUB] GET -> /:<postID> - get post by :postID

  • [AUTH] POST -> /:<postID>/like - like post

  • [AUTH] DELETE -> /:<postID>/unlike - unlike post

  • [AUTH] GET -> /:<postID>/isLiked - get if user has liked the post

/comments:

  • [AUTH] POST -> / - create a comment to post
  • [PUB] GET -> /:<postID> - get :postID post comments
  • [PUB] GET -> /:<postID>/:<commentID>/replies - get :commentID comment replies
  • [AUTH] DELETE -> /:<postID>/:<commentID> - delete :commentID comment
  • [AUTH] GET -> /:<postID>/:<commentID>/isLiked - get if user has liked the comment
  • [AUTH] POST -> /:<postID>/:<commentID>/like - like comment
  • [AUTH] DELETE -> /:<postID>/:<commentID>/unlike - unlike comment

Directories

Path Synopsis
internal
dto

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL