基于偏移的分页
中级 API 响应
使用基于偏移分页及页面和总计数的 API 响应。 一个真实、可直接使用的示例,你可以复制、调整,或用来测试自己的代码。
{
"data": [
{ "id": "post_021", "title": "Getting Started with JSON" },
{ "id": "post_022", "title": "Advanced JSON Techniques" },
{ "id": "post_023", "title": "JSON Schema Deep Dive" }
],
"meta": {
"total": 150,
"page": 3,
"perPage": 10,
"totalPages": 15
}
} - pagination
- offset
- page
- REST