Skip to content
JinHo Kim edited this page May 21, 2023 · 4 revisions

Auth

OAuth 로그인 리다이렉트

Request GET /auth/redirect/{authProvider}
Response 303

OAuth 인증 코드

Request GET /auth/{authProvider}/sign-in?code
Response 200
{
  accessToken: string
}

Member

유저 프로필 정보

Request GET /members/profile?username={username}
Response 200
{
	"id": int,
 	"username": string,
	"profileImage": string,
	"name": string,
	"biography": string,
	"followerCnt": int,
	"followingCnt": int,
	"isFollowing": boolean
}

유저 개인 정보

Request GET /members/me
Response 200
{
	"id": int,
	"name": string,
 	"usename": string,
	"profileImage": string,
	"name": string,
	"biography": string,
	"email": string
}

유저 개인 정보 수정

Request POST /members/me multipart/form-data
body
{
 	"username": string,
	"biography": string
}
image
Response 200

유저 검색

Request GET /members/search?username={username}&page={page}
Response 200
{
  "members": [
		{
			"id": int,
			"username": string,
			"profileImage": string
		},
		{
			"id": int,
			"username": string,
			"profileImage": string
		}
	],
	"last": boolean,
	"offset": int
}

팔로우

Request POST /members/{memberId}/follow
Response 200

팔로우 취소

Request DELETE /members/{memberId}/follow
Response 200

디바이스 토큰 추가

Request POST /members/device
{
  "token": string
}
Response 200

Feed

유저 피드 조회

Request GET /feed/me?page={page}
Response 200
{
  "feed": [
		{
			"id": int,
			"username": string,
			"images": [
				"imageUrl": string,
				"imageUrl": string
			],
			"likeCnt": int,
			"content": string,
			"createdAt": yyyy-MM-dd'T'HH:mm:ss,
			"isLike": boolean
		},
		{
			"id": int,
			"username": string,
			"images": [
				"imageUrl": string,
				"imageUrl": string
			],
			"likeCnt": int,
			"content": string,
			"createdAt": yyyy-MM-dd'T'HH:mm:ss,
			"isLike": boolean
		}
	],
	"last": boolean,
	"offset": int
}

최신 피드 조회

Request GET /feed/timeline?page={page}
Response 200
{
  "timeline": [
		{
			"id": int,
			"imageUrl": string,
		},
		{
			"id": int,
			"imageUrl": string,
		}
	],
	"last": boolean,
	"offset": int
}

Post

게시글 업로드

Request POST /posts multipart/form-data
body
{
	"content": string"
}
Response 200

특정 게시글 조회

Request GET /posts/{postId}
Response 200
{
	"id": int,
	"authorId": int,
	"authorUsername": string,
	"authorProfile": string,
	"images": [
		"imageUrl": string,
		"imageUrl": string
	],
	"likeCnt": int,
	"content": string,
	"createdAt": yyyy-MM-dd'T'HH:mm:ss,
	"isLike": boolean
}

게시글 삭제

Request DELETE /posts
Response 200

Like

좋아요

Request POST /posts/{postId}/like
Response 200

좋아요 취소

Request DELETE /posts/{postId}/like
Response 200

Comment

댓글 조회

Request GET /posts/{postId}/comments?page={page}
Response 200
{
	"comments": [
		{
			"id": int
			"authorId": int,
			"authorProfile": string,
			"authorUsername": string,
			"content": string,
			"createdAt": yyyy-MM-dd'T'HH:mm:ss
			"content": string
		}
	],
	"last": boolean,
	"offset": int
}

댓글 작성

Request POST /posts/{postId}/comments
{
	"content": string
}
Response 200

댓글 삭제

Request DELETE /posts/{postId}/comments
Response 200

Alarm

알람 조회

Request GET /alarms?page={page}
Response 200
{
	"alarms": [
		{
			"id": int,
			"text": string,
			"read": boolean
		}
	],
	"last": boolean,
	"offset": int
}

알람 조회

Request POST /alarms/{alarmId}/read
Response 200