First public release of PaginatedRESTClient — a pluggable, dependency-free Swift paginator for bearer-authenticated REST APIs.
Highlights
- Concurrent pagination. When the first response reports a
total, pages are fetched in a bounded concurrent window instead of a serialnext_pagewalk — tens of seconds become a few on large lists. - Ordered-prefix streaming.
streamAllPagesyields page one first and emits growing, correctly-ordered snapshots even though pages finish out of order. next_pagefallback & dedup. Cursor-style endpoints fall back to a sequential walk; items are de-duplicated by a stable identity so echoed pages can't create duplicates.- Resilient & off-main. Idempotent GETs retry transient failures (5xx, 429, timeouts) with exponential backoff, and JSON decodes on a background task.
- Pluggable transport. The networking seam is
RESTTransportat the byte layer.URLSessionTransportships as the batteries-included default;GetTransportandAlamofireTransportadapter examples are documented without becoming dependencies. - Foundation-only core. No third-party dependencies; Linux-clean, with CI building and testing on macOS and Linux.
Requirements
- Swift 6.2+
- macOS 15+, iOS 18+, tvOS 18+, watchOS 11+, visionOS 2+, or Linux
Installation
.package(url: "https://github.com/adamtheturtle/PaginatedRESTClient.git", from: "0.1.0")See the README for usage and the pagination model.