Communitrip

API documents for Random-Motivation-Wise-saying

유저 정보

GET https://communitrip.com/users/:userId

Path Parameters

Name
Type
Description

user_id*

int

{
    "id": "1",
    "username": "kimcoding",
    "email": "kimcoding@codestates.com",
    "user_profile": "./images/kimcoding"
}

회원가입

POST https://communitrip.com/users/signup

Request Body

Name
Type
Description

username*

string

email*

string

password*

string

회원정보 수정

PATCH https://communitrip.com/users/:userId

Request Body

Name
Type
Description

username

string

password

string

user_id

int

user_profile

string

로그인

POST https://communitrip.com/users/login

Request Body

Name
Type
Description

email*

string

password*

string

로그아웃

POST https://communitrip.com/users/logout

회원탈퇴

DELETE https://communitrip.com/users/:userId

Headers

Name
Type
Description

user_id*

int

게시글 전체

GET https://communitrip.com/posts

나의 게시글 전체

GET https://communitrip.com/posts/users/:userId

게시글 하나

GET https://communitrip.com/posts/:postId

Path Parameters

Name
Type
Description

post_id*

int

게시글 생성

POST https://communitrip.com/posts/:userId

Request Body

Name
Type
Description

user_id*

int

contents*

string

title*

string

tag_id*

int

image*

string

게시판 태그 요청

GET https://communitrip.com/tags

게시글 삭제

DELETE https://communitrip.com/posts/:postId

Headers

Name
Type
Description

post_id*

int

user_id*

int

게시글 수정

PATCH https://communitrip.com/posts/:postId

Request Body

Name
Type
Description

post_id*

int

contents*

string

title*

string

tag_id*

int

image

string

댓글 생성

POST https://communitrip.com/posts/:postsId/comments

Request Body

Name
Type
Description

user_id*

int

post_id*

int

comment*

string

댓글 수정

PATCH https://communitrip.com/posts/:postsId/comments/:commentsId

Request Body

Name
Type
Description

post_id*

int

comment*

string

comment_id*

int

댓글 갱신

GET https://communitrip.com/posts/:postId/comments

Path Parameters

Name
Type
Description

post_id*

int

댓글 삭제

DELETE https://communitrip.com/posts/:postsId/comments/:commentsId

Headers

Name
Type
Description

user_id*

int

post_id*

int

좋아요 증가

POST https://communitrip.com/posts/:postsId/likes

Request Body

Name
Type
Description

user_id*

int

post_id*

int

좋아요 갱신

GET https://communitrip.com/posts/:postId/likes

Path Parameters

Name
Type
Description

post_id*

int

좋아요 취소

DELETE https://communitrip.com/posts/:postsId/likes

Headers

Name
Type
Description

post_id*

int

user_id*

int

Last updated