Routine
루틴
루틴
루틴 생성
POST
52.78.77.1:8000/routine/
routine 이름, comment, day를 전달하면, 현재 로그인 되어 있는 유저의 소유로 루틴을 생성함
Request Body
routine_name
String
루틴 이름
routine_comment
String
루틴 설명
routine_day
int
루틴 주기 (날짜)
{
"routine_id": 26,
"routine_name": "ju's rout",
"routine_comment": "열심히 운동합시다",
"recommend_count": 0,
"routine_day": 3,
"created_at": "2023-11-08T18:00:41.348127Z",
"nickname": "RatRat"
}
루틴 id에 따른 루틴 조회
GET
52.78.77.1:8000/routine/check/{routine_id}/
Path Parameters
routine_id*
int
루틴 아이디
{
"routine_id": 26,
"routine_name": "ju's rout",
"routine_comment": "열심히 운동합시다",
"recommend_count": 0,
"routine_day": 3,
"nickname": "RatRat",
"created_at": "2023-11-08T18:00:41Z"
}
내 소유의 루틴 조회
GET
52.78.77.1:8000/routine/check/mine/
현재 로그인한 유저가 소유하고 있는 루틴들 조회
[
{
"routine_id": 7,
"routine_name": "newR5",
"routine_comment": "it is new4",
"recommend_count": 4,
"routine_day": 3,
"nickname": "a",
"created_at": "2023-09-24T17:59:20Z"
}
]
루틴 수정
PUT
52.78.77.1:8000/routine/modify/{routine_id}/
루틴 이름, 설명, 주기 등 원하는 정보를 전달 후 수정
Path Parameters
routine_id*
int
루틴 아이디
Request Body
routine_name
String
루틴 이름
routine_comment
String
루틴 설명
routine_day
int
루틴 주기 (날짜)
{
"routine_name": "juju",
"routine_comment": "it is newRoutine",
"routine_day": 3
}
루틴 삭제
DELETE
52.78.77.1:8000/routine/delete/{routine_id}/
전달된 루틴 정보 삭제(해당 루틴의 세부 정보들까지 함께 삭제됨)
Path Parameters
routine_id*
int
루틴 아이디
{
"message": "삭제 성공"
}
루틴 검색
POST
52.78.77.1:8000/routine/search/
searchData를 통해
routine_comment, routine_name, nickname에 대해 검색
부분 검색 가능
Request Body
searchData*
String
검색 데이터
[
{
"routine_id": 12,
"routine_name": "newR5",
"routine_comment": "it is new4",
"nickname": "a",
"created_at": "2023-10-09T06:32:24Z"
},
{
"routine_id": 11,
"routine_name": "newR5",
"routine_comment": "it is new4",
"nickname": "a",
"created_at": "2023-10-06T18:52:51Z"
},
{
"routine_id": 7,
"routine_name": "newR5",
"routine_comment": "it is new4",
"nickname": "a",
"created_at": "2023-09-24T17:59:20Z"
}
]
루틴 좋아요 기능
POST
52.78.77.1:8000/routine/like/
post로 보낸 routine에 대해 좋아요 기능.
현재 누른 상태이면 해제, 해제된 상태이면 누르기.
Request Body
routine_id*
int
루틴 아이디
{
"message": "Recommend Success"
}
루틴 세부사항
루틴 세부사항 조회
GET
52.78.77.1:8000/routine/detail/check/{routine_id}/
해당 루틴의 일자별 세부사항들 모두 조회
Path Parameters
routine_id*
int
루틴 아이디
[
{
"routine_detail_id": 56,
"routine": 26,
"day": 3,
"routine_name": "juju",
"usebody_name": "waist",
"exercise_name": "45° side bend"
},
{
"routine_detail_id": 57,
"routine": 26,
"day": 1,
"routine_name": "juju",
"usebody_name": "waist",
"exercise_name": "45° side bend"
}
]
루틴 세부사항 생성
POST
52.78.77.1:8000/routine/detail/
루틴, 운동, 일자 정보를 받아 해당 일자에 해당 루틴에서 할 운동들을 정함
Request Body
routine_id*
int
루틴 아이디
exercise_id*
int
운동 아이디
day*
int
일자(루틴의 몇 일차 상황인지)
{
"routine": 26,
"exercise": 3,
"usebody": 6,
"day": 3
}
루틴 세부사항 삭제
DELETE
52.78.77.1:8000/routine/detail/delete/{routine_detail_id}/
해당 번호의 루틴 세부사항을 삭제함
수정 페이지 특성상 본인 루틴으로만 들어올 수 있으므로 세부사항 삭제에서는 로그인 체크 불필요
Path Parameters
routine_detail_id*
int
루틴 세부사항 아이디
{
"message": "삭제 성공"
}
박스 (루틴 보관함)
루틴 보관함에 있는 루틴 조회(내가 담은 루틴)
GET
52.78.77.1:8000/routine/box/check/
현재 로그인되어 있는 유저가 보관함에 담은 루틴 리스트 조회
[
{
"user": 7,
"routine": 26
},
{
"user": 7,
"routine": 18
}
]
루틴 보관함에 루틴 추가
POST
52.78.77.1:8000/routine/box/
현재 로그인되어 있는 유저의 보관함에 루틴을 추가
Request Body
routine_id*
int
루틴 아이디
{
"user": 29,
"routine": 7
}
루틴 보관함에 있는 루틴 삭제
POST
52.78.77.1:8000/routine/box/delete/
현재 로그인되어 있는 유저의 보관함에서 해당 루틴을 삭제
Request Body
routine_id*
int
루틴 아이디
{
"message": "삭제 완료",
"deleted_routine": "18"
}
루틴 추천-공유
팔로우 중인 유저의 루틴 공유
GET
52.78.77.1:8000/routine/recommend/follow/
현재 로그인 중인 유저가 팔로우 중인 유저들 소유의 루틴 조회
(최신순으로 조회됨)
[
{
"routine_id": 12,
"routine_name": "newR5",
"routine_comment": "it is new4",
"recommend_count": 0,
"routine_day": 3,
"nickname": "a",
"created_at": "2023-10-09T06:32:24Z"
},
{
"routine_id": 11,
"routine_name": "newR5",
"routine_comment": "it is new4",
"recommend_count": 4,
"routine_day": 3,
"nickname": "a",
"created_at": "2023-10-06T18:52:51Z"
},
{
"routine_id": 7,
"routine_name": "newR5",
"routine_comment": "it is new4",
"recommend_count": 4,
"routine_day": 3,
"nickname": "a",
"created_at": "2023-09-24T17:59:20Z"
}
]
추천수 순으로 루틴 공유
GET
52.78.77.1:8000/routine/recommend/pop/
recommend_count가 높은 순서대로 루틴들을 정렬 조회
[
{
"routine_id": 7,
"routine_name": "newR5",
"routine_comment": "it is new4",
"recommend_count": 4,
"routine_day": 3,
"nickname": "a"
},
{
"routine_id": 8,
"routine_name": "newR5",
"routine_comment": "it is new4",
"recommend_count": 4,
"routine_day": 3,
"nickname": "RatRat"
},
{
"routine_id": 12,
"routine_name": "newR5",
"routine_comment": "it is new4",
"recommend_count": 0,
"routine_day": 3,
"nickname": "a"
}
]
생성한 날짜 순으로 루틴 공유
GET
52.78.77.1:8000/routine/recommend/latest/
루틴이 생성된 date인 created_at을 기준으로 루틴들을 정렬 조회
[
{
"routine_id": 27,
"routine_name": null,
"routine_comment": "it is new4",
"recommend_count": 0,
"routine_day": 3,
"nickname": "RatRat",
"created_at": "2023-11-08T18:05:23Z"
},
{
"routine_id": 26,
"routine_name": "juju",
"routine_comment": "it is newRoutine",
"recommend_count": 0,
"routine_day": 3,
"nickname": "RatRat",
"created_at": "2023-11-08T18:00:41Z"
},
{
"routine_id": 25,
"routine_name": "juho",
"routine_comment": "it is new4",
"recommend_count": 0,
"routine_day": 3,
"nickname": "RatRat",
"created_at": "2023-10-31T16:51:36Z"
},
{
"routine_id": 24,
"routine_name": "jieuneie",
"routine_comment": "it is new4",
"recommend_count": 0,
"routine_day": 3,
"nickname": "RatRat",
"created_at": "2023-10-27T08:25:51Z"
}
]
Last updated