Skip to content

[Task] 단어 관리 API 서비스 구현 #65

Description

@DDINGJOO

상위 Story

목표

단어 목록 조회, 검색, 상세 조회 API 서비스 함수 구현

구현 내용

파일 위치

src/domains/vocab/services/vocabService.js

API 엔드포인트

함수 메서드 엔드포인트
wordService.getList GET /vocab/words
wordService.search GET /vocab/words/search
wordService.getDetail GET /vocab/words/{wordId}

구현 예시

export const wordService = {
  getList: ({ level, category, limit = 20, cursor } = {}) => 
    vocabApi.get('/vocab/words', { params: { level, category, limit, cursor } }),
  
  search: ({ q, limit = 20, cursor } = {}) =>
    vocabApi.get('/vocab/words/search', { params: { q, limit, cursor } }),
  
  getDetail: (wordId) =>
    vocabApi.get(`/vocab/words/${wordId}`),
}

완료 조건

  • wordService 객체 구현
  • 3개 API 함수 구현

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