/farmfather-api

농축산 관련 온라인 강의 플랫폼 '팜파더' 프로젝트 REST API

Primary LanguageJava

1. 시스템 아키텍쳐

system_architecture

2. 엔드포인트(endpoint)

1) auth(인증)

a. 회원가입

POST /api/register

body

{
	"email": string,
	"password": string,
	"nickName": string
}

b. 로그인

POST /api/authenticate

body

{
	"email": string,
	"password": string
}

c. 닉네임 변경

POST /api/nickName

headers

{
	"jwt": string
}

body

{
	"nickName": string
}

d. 프로필 사진 변경

POST /api/user/profile

headers

{
	"jwt": string
}

body(formdata)

{
	"profileImage": multipart-file	
}

e. 회원 조회

GET /api/user/<유저ID>

headers

{
	"jwt": string
}

2) course(수업)

a. 수업 정보 조회

GET /api/course/<수업ID>

headers

{
	"jwt": string
}

b. 전체 수업 목록 조회

GET /api/course/all

headers

{
	"jwt": string
}

c. 내가 만든 수업 목록 조회

GET /api/course/my

headers

{
	"jwt": string
}

d. 생성

POST /api/course

headers

{
	"jwt": string
}

body

{
	"title": string
}

e. 수정

PUT /api/course/update

headers

{
	"jwt": string
}

body

{
	"id": string,
	"title": string,
	"learns": array<string>,
	"status": string(ready/pending),
	"price": integer,
	"detail": string,
	"chapters": [
		{
			"id": string,
			"title": string,
			"lectures": [
				{
					"id": string,
					"title": string,
					"videoId": string
				},
				...
			]
		},
		...
	]
}

f. 썸네일 변경

POST /api/course/<수업ID>/thumbnail

headers

{
	"jwt": string
}

body(formdata)

thumbnailImage - multipartfile

g. 수업 삭제

DELETE /api/course/<수업ID>

headers

{
	"jwt": string
}

h. 리뷰 저장

PUT /api/course/<수업ID>/rating/save

headers

{
	"jwt": string
}

body

{
	"star": integer,
	"comment": string
}

i. 리뷰 삭제

DELETE /api/course/<수업ID>/rating/<리뷰ID>

headers

{
	"jwt": string
}

h. 질문 저장

PUT /api/course/<수업ID>/qna/save

headers

{
	"jwt": string
}

body

{
	"star": integer,
	"comment": string
}

i. 질문 삭제

DELETE /api/course/<수업ID>/qna/<질문ID>

headers

{
	"jwt": string
}

body

{
	"title": string,
	"question": string
}