mirror of
https://github.com/Shineii86/AniKotoAPI.git
synced 2026-10-22 10:55:10 +00:00
docs: update all documentation with pagination and fixes
- Update CHANGELOG.md with pagination metadata and bug fixes - Update README.md with pagination documentation and project structure - Update docs/endpoints.md with pagination section - Update docs/index.md with pagination feature - Update docs/architecture.md with pagination helper
This commit is contained in:
@@ -337,7 +337,8 @@ AniKotoAPI/
|
||||
│ │ ├── 📄 cache.helper.js # 💾 In-memory caching
|
||||
│ │ ├── 📄 countPages.helper.js # 📄 Pagination counter
|
||||
│ │ ├── 📄 extractPages.helper.js # 📃 Page fetcher
|
||||
│ │ └── 📄 formatTitle.helper.js # 🔤 Title formatter
|
||||
│ │ ├── 📄 formatTitle.helper.js # 🔤 Title formatter
|
||||
│ │ └── 📄 pagination.helper.js # 📊 Pagination metadata generator
|
||||
│ │
|
||||
│ ├── 📂 middleware/ # 🔧 Express middleware
|
||||
│ │ └── 📄 creatorInfo.js # ✍️ Creator attribution injection
|
||||
@@ -1933,6 +1934,38 @@ console.log(resp.data);
|
||||
}
|
||||
```
|
||||
|
||||
### Pagination Metadata
|
||||
|
||||
All list endpoints include pagination metadata in the response:
|
||||
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"results": {
|
||||
"data": [...],
|
||||
"pagination": {
|
||||
"currentPage": 1,
|
||||
"totalPages": 294,
|
||||
"totalItems": 8820,
|
||||
"itemsPerPage": 30,
|
||||
"hasNext": true,
|
||||
"hasPrev": false
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| Field | Type | Description |
|
||||
|:---|:---|:---|
|
||||
| `currentPage` | `number` | Current page number (1-indexed) |
|
||||
| `totalPages` | `number` | Total number of pages available |
|
||||
| `totalItems` | `number` | Estimated total items across all pages |
|
||||
| `itemsPerPage` | `number` | Number of items per page (default: 30) |
|
||||
| `hasNext` | `boolean` | Whether there is a next page |
|
||||
| `hasPrev` | `boolean` | Whether there is a previous page |
|
||||
|
||||
**Endpoints with pagination:** `/api/search`, `/api/most-popular`, `/api/new-release`, `/api/newly-added`, `/api/latest-updated`, `/api/az-list/:letter`, `/api/filter`, `/api/genre/:name`, `/api/type/:name`, `/api/status/:name`
|
||||
|
||||
### Anime Item Object
|
||||
|
||||
| Field | Type | Description | Example |
|
||||
|
||||
Reference in New Issue
Block a user