Skip to content

Pagination API Document

Jynn Park edited this page Oct 9, 2021 · 1 revision

https://github.com/inhibitor1217/coffee-hmm/pull/210

/list api 호출 시 Response Pattern 🤓

'{entity}' : {
  'count' : 'total count number',
  'list' : [

  ],
  'cursor' : 'string typed cursor',
}

1. count : entity 의 총 개수

2. list :

  • pagination 적용된 사이즈
  • 마지막 페이지인 경우 페이지 사이즈보다 작은 길이

3. cursor :

  • 첫 page 호출 시 미사용
  • 다음 page 호출 시 사용
  • 마지막 페이지의 커서로 api 호출 시 response는 빈 list 에 cursor undefined
  • Q. (jy)마지막 페이지에서 cursor undefined 안되나요! 🙋‍♀️ A. (ddg) 복잡해져요...ㅜㅡㅠ 🙅‍♂️
  • + 가 포함되면 escaping 필요 %2b
Clone this wiki locally