Skip to content

[Story] Vocab API 서비스 레이어 구축 #58

Description

@DDINGJOO

상위 Epic

목표

단어 암기 백엔드 API와 통신하는 서비스 레이어 구축

API Base URL

https://gc8l9ijhzc.execute-api.ap-northeast-2.amazonaws.com/dev

구현 범위

1. Axios 인스턴스 설정

  • src/api/vocabApi.js 생성
  • Base URL, 타임아웃, 인터셉터 설정

2. 서비스 함수 구현 (src/domains/vocab/services/vocabService.js)

서비스 API 설명
wordService.getList GET /vocab/words 단어 목록 조회
wordService.search GET /vocab/words/search 단어 검색
wordService.getDetail GET /vocab/words/{wordId} 단어 상세
dailyService.getWords GET /vocab/daily/{userId} 오늘의 학습 단어
dailyService.markLearned POST /vocab/daily/{userId}/words/{wordId}/learned 학습 완료
userWordService.getList GET /vocab/users/{userId}/words 학습 상태 조회
userWordService.update PUT /vocab/users/{userId}/words/{wordId} 정답/오답 업데이트
userWordService.updateTag PUT /vocab/users/{userId}/words/{wordId}/tag 북마크/난이도 변경
testService.start POST /vocab/test/{userId}/start 시험 시작
testService.submit POST /vocab/test/{userId}/submit 답안 제출
testService.getResults GET /vocab/test/{userId}/results 시험 결과 목록
statsService.getOverall GET /vocab/stats/{userId} 전체 통계
statsService.getDaily GET /vocab/stats/{userId}/daily 일별 통계
statsService.getWeakness GET /vocab/stats/{userId}/weakness 약점 분석
voiceService.synthesize POST /vocab/voice/synthesize TTS 발음

하위 태스크

  • Vocab axios 인스턴스 설정
  • 단어 관리 API 서비스 구현
  • 일일 학습 API 서비스 구현
  • 사용자 단어 상태 API 서비스 구현
  • 시험 API 서비스 구현
  • 통계 API 서비스 구현
  • TTS API 서비스 구현

완료 조건

  • 모든 API 엔드포인트 연동 함수 구현
  • 에러 핸들링 적용
  • 타입스크립트 JSDoc 주석 추가 (선택)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions