1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! # faucet-stream
//!
//! A declarative, config-driven REST API client for Rust with pluggable
//! authentication, pagination, record transforms, schema inference,
//! and incremental replication.
//!
//! ## Overview
//!
//! Configure a [`RestStreamConfig`] once, call [`RestStream::fetch_all()`] or
//! [`RestStream::fetch_all_as::<T>()`], and get all records — no manual
//! pagination loop, no auth boilerplate.
//!
//! ## Key capabilities
//!
//! - **Authentication**: Bearer, Basic, API Key (header or query), OAuth2
//! (client credentials with automatic token caching), or custom headers
//! - **Pagination**: cursor/token, page number, offset/limit, Link header,
//! or next-link-in-body — all with automatic loop detection
//! - **JSONPath extraction**: point at where records live in any JSON response
//! - **Record transforms**: flatten nested objects, regex key renaming,
//! snake_case normalisation, or custom closures (feature-gated)
//! - **Schema inference**: derive a JSON Schema from sampled records via
//! [`RestStream::infer_schema()`]
//! - **Incremental replication**: bookmark-based filtering via
//! [`RestStream::fetch_all_incremental()`]
//! - **Partitions**: run the same config across multiple contexts
//! (e.g. per-org, per-repo) with path placeholder substitution
//! - **Retries with backoff**: exponential backoff with 429 rate-limit handling
//! - **Streaming**: process pages as they arrive with [`RestStream::stream_pages()`]
pub use DEFAULT_EXPIRY_RATIO;
pub use ;
pub use RestStreamConfig;
pub use FaucetError;
pub use PaginationStyle;
pub use ReplicationMethod;
pub use RestStream;
pub use RecordTransform;