console.log

[설계] API 명세서 본문

프로젝트/하루팔레트

[설계] API 명세서

foresight 2023. 10. 4. 20:20

 

 
기능명
요청 요청값 응답값
메서드 URL 위치 속성 타입 설명 위치 속성 타입 설명
인증
/oauth2/authorization/kakao
인증(프론트-인증)           인가 코드        
로그인(인증-비즈니스)
POST
 
body userId String 사용자 PK        
body image String 프로필 이미지        
사용자
/api/v1/users
정보 조회
GET
 
header Authorization token 토큰 body(profileDto) image String 프로필 이미지
        body friendEname String 캐릭터 영문 이름
        body friendId Long 캐릭터 PK
        body isToday Boolean 오늘 일기 유무
리마인드 GET /remind header Authorization token 토큰 body diaryId Long 일기 PK
도전 과제 조회
GET
/challenge
header Authorization token 토큰 body(challengeListDto) weekCnt INT 주 cnt
        body monthCnt INT 월 cnt
        body currentPoint INT 현재 포인트
        body(challengeList) challenge_id Long 챌린지 PK
        body contents String 내용
        body point INT 포인트
포인트 내역 조회
GET
/points
header Authorization token 토큰 body(pointList) point INT 포인트
param category String 구분(all, earn, use) body prevPoint INT 누적 포인트
param date String 날짜(YYYY-MM) body date String 등록 일시(YYYY-MM-DD)
        body contents String 내용
        body type String 구분
        body(pointListDto) currentPoint INT 현재 포인트
일기
/api/v1/diaries
상세 조회
GET
 
header Authorization token 토큰 body(detailDiaryDto) diaryId Long 일기 PK
param diaryId Long 일기 PK body date String 등록 일시
        body contents String 내용
        body weather String 날씨
        body friendEname String 캐릭터 영문 이름
        body answer String 위로의 말
        body image String 이미지 경로
        body stickerCode String 스티커 코드
        body neutral INT 중립(0-100)
        body happy INT 행복(0-100)
        body surprise INT 당황(0-100)
        body anger INT 분노(0-100)
        body anxiety INT 불안(0-100)
        body sadness INT 슬픔(0-100)
        body disgust INT 혐오(0-100)
STT
POST
/stt
header Authorization token 토큰        
body file multipart/form-data 음성 파일        
path order String 순서        
스크립트 초기화 POST /script header Authorization token 토큰        
작성
POST
 
header Authorization token 토큰        
body(diaryDto) stickerCode String 스티커 코드        
body weather String 날씨        
body contents String 내용        
body friendId Long 캐릭터 PK        
body image String 이미지 경로        
body(file) file multipart/form-data 파일        
이미지 조회 GET /image header Authorization token 토큰 body image String 이미지 경로
수정 조회
GET
/script
header Authorization token 토큰 body contents String 내용
param order INT 인덱스        
삭제
PATCH
/{diaryId}
header Authorization token 토큰        
path diaryId Long 일기 PK        
달력 조회
GET
/calendars
header Authorization token 토큰 body(List<CalenderListDto>) diaryId Long 일기 PK
param date String 날짜(YYYY-MM) body emotion INT 감정값(행복)(0-100)
        body date String 등록 일시(YYYY-MM-DD)
캐릭터
/api/v1/friends
캐릭터 조회
GET
 
header Authorization token 토큰 body(friendList) friendId Long 캐릭터 PK
        body kname String 캐릭터 이름
        body ename String 캐릭터 영문 이름
        body contents String 캐릭터 설명
        body tag String 태그
        body price INT 가격
        body isBuy boolean 구매 여부
        body(friendListDto) currentPoint INT 현재 포인트
캐릭터 선택
PATCH
/{friendId}
header Authorization token 토큰 body currentPoint INT 현재 포인트
path friendId Long 캐릭터 PK        
캐릭터 구매
POST
 
header Authorization token 토큰 body currentPoint INT 현재 포인트
body friendId Long 캐릭터 PK        

'프로젝트 > 하루팔레트' 카테고리의 다른 글

[설계] Git 컨벤션  (0) 2023.09.27
[기획] 개발 환경  (0) 2023.09.26
[기획] 요구사항 명세서  (0) 2023.09.20