Commit b5a44da
feat: add comprehensive pagination helpers with Flow support
Implement Flow-based pagination utilities for all paginated API endpoints:
- Add generic PaginatedResponse interface for type-safe pagination
- Implement three pagination methods: asFlow(), collectAll(), asPagesFlow()
- Add Flow helpers to all 6 APIs (DataSources, Blocks, Comments, Users, Search, Pages)
- Create comprehensive pagination documentation guide
- Add unit tests (9 tests) and integration tests (5 tests)
Benefits:
- Memory-efficient processing of large result sets
- Reactive processing patterns with Kotlin Flow
- Reduces boilerplate for manual pagination loops
- Type-safe cursor handling
Breaking changes: None - additive only
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent c58736e commit b5a44da
File tree
22 files changed
+2779
-29
lines changed- docs
- journal
- src
- main/kotlin/no/saabelit/kotlinnotionclient
- api
- models
- blocks
- comments
- databases
- pages
- search
- users
- utils
- test/kotlin
- integration/pagination
- unit/utils
22 files changed
+2779
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
372 | 376 | | |
373 | 377 | | |
374 | 378 | | |
375 | 379 | | |
376 | 380 | | |
377 | 381 | | |
378 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
379 | 415 | | |
380 | 416 | | |
381 | 417 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
198 | 202 | | |
199 | 203 | | |
200 | 204 | | |
| |||
209 | 213 | | |
210 | 214 | | |
211 | 215 | | |
212 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
213 | 255 | | |
214 | 256 | | |
215 | 257 | | |
| |||
0 commit comments