Skip to content

anstjaos/Health-Service-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Health Service API

  • Spring Boot
  • JPA
  • TDD
  • Reactive Programming (24.01.23)

Branch

main > develop > feature

feature에서 작업한 부분 develop에 머지 시 PR

일주일 간격 Sprint 끝나면 develop main으로 머지

머지 시에는 --no-ff

API Spec

User

  • 회원 등록
POST /users

Request

{
  "userId": "test@naver.com",
  "nickname": "test",
  "password": "asdf...", # encoded SHA-256
  "email": "test@naver.com"
}

Response

{
  "isSuccess": true,
  "message": null,
  "data": {
    "userNum": 1
  }
}
  • 회원 정보 수정
PUT /users/{userNum}

Request

{
  "nickname": "asdf",
 	"password": "asdfasf..",
  "email": "test@daum.net"
}

Response

{
	"isSuccess": true,
  "message": null,
  "data": null
}
  • 회원 탈퇴
DELETE /users/{userNum}

Header

{
	"x-access-token": "asdfefdf~"
}

Response

{
	"isSuccess": true,
  "message": null,
  "data": null
}
  • 로그인
POST /auth/login

Request

{
	"userId": "test@naver.com",
	"password": "asdfasdf" # encoded SHA-256
}

Response

{
	"isSuccess": true,
  "message": null,
  "data": {
    "token": "IEmeifeif~~"
  }
}
  • 로그아웃
DELETE /auth/logout/{userNum}

Header

{
	"x-access-token": "IEmeifeif~~"
}

Response

{
	"isSuccess": true,
  "message": null,
  "data": null
}

Exercise

  • 운동 등록
POST /exercises

Request

{
  "exerciseName": "bench press",
  "exerciseTypeId": 1,
  "bodyPartId": 1
}

Response

{
	"isSuccess": true,
  "message": null,
  "data": null
}
  • 운동 수정
PUT /exercises/{exerciseId}

Request

{
  "exerciseName": "change",
  "exerciseTypeId": 2,
  "bodyPartId": 2
}

Response

{
	"isSuccess": true,
  "message": null,
  "data": null
}
  • 운동 조회
GET /exercises/{exerciseId}

Response

{
	"isSuccess": true,
  "message": null,
  "data": null
}
  • 운동 삭제
DELETE /exercises/{exerciseId}

Response

{
	"isSuccess": true,
  "message": null,
  "data": null
}
  • 수행한 운동 등록
POST /users/{userNum}/exercises/{exerciseId}

Request

{
  "date": "2021-05-27 15:00:00",
  "exerciseCount": 10,
  "setCount": 3
}

Response

{
	"isSuccess": true,
  "message": null,
  "data": null
}
  • 수행한 운동 수정
PUT /users/{userNum}/exercises/{exercisesId}/maps/{mapId}

Request

{
  "exerciseCount": 12,
  "setCount": 5
}

Response

{
	"isSuccess": true,
  "message": null,
  "data": null
}
  • 수행한 운동 조회
GET /users/{userNum}/exercises/{exercisesId}/maps/{mapId}

Response

{
	"isSuccess": true,
  "message": null,
  "data": {
    "exerciseName": "bench press",
    "exerciseCount": 12,
    "date": "2021-05-27 15:00:00",
    "setCount": 4,
    "exerciseTypeId": 1,
    "bodyPartId": 3
  }
}
  • 수행한 운동 전체 조회
GET /users/{userNum}/exercises

Response

{
	"isSuccess": true,
  "message": null,
  "data": {
    "exercises" : [
      {
        "exerciseName": "bench press",
        "exerciseCount": 12,
        "date": "2021-05-27 15:00:00",
        "setCount": 4,
        "exerciseTypeId": 1,
        "bodyPartId": 3
      },
      {
        ...
      }
    ]
  }
}
  • 수행한 운동 삭제
DELETE /users/{userNum}/exercises/{exerciseId}/maps/{mapId}

Response

{
	"isSuccess": true,
  "message": null,
  "data": null
}

Routine

  • 루틴 등록
POST /users/{userNum}/routines

Request

{
  "routineName": "hi",
  "dayOfWeek": 4
}

Response

{
	"isSuccess": true,
  "message": null,
  "data": null
}
  • 루틴 수정
PUT /users/{userNum}/routines/{routineId}

Request

{
  "routineName": "change",
  "dayOfWeek": 3
}

Response

{
	"isSuccess": true,
  "message": null,
  "data": null
}
  • 루틴 조회
GET /users/{userNum}/routines/{routineId}

Response

{
	"isSuccess": true,
  "message": null,
  "data": {
    "routineName": "test",
    "dayOfWeek": 3
  }
}
  • 전체 루틴 조회
GET /users/{userNum}/routines

Response

{
	"isSuccess": true,
  "message": null,
  "data": {
    "routines": [
      {
        "routineName": "test",
        "dayOfWeek": 3
      }, 
      {
      	...  
      }
    ]
  }
}
  • 루틴 삭제
DELETE /users/{userNum}/routines/{routineId}

Response

{
	"isSuccess": true,
  "message": null,
  "data": null
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages