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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! # akahu-client
//!
//! A non-official Rust client library for the [Akahu API](https://www.akahu.nz/),
//! providing access to financial data aggregation services in New Zealand.
//!
//! ## Features
//!
//! - Fetch user accounts and account details
//! - Retrieve transactions with pagination support
//! - Access user identity and profile information
//! - Type-safe API with strongly-typed models
//! - Async/await support using tokio
//! - Comprehensive error handling
//!
//! ## Quick Start
//!
//! ```no_run
//! use akahu_client::{AkahuClient, UserToken};
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! // Create a client with your app token
//! let client = AkahuClient::new(
//! reqwest::Client::new(),
//! "app_token_...".to_string(),
//! None
//! );
//!
//! // Create a user token from OAuth flow
//! let user_token = UserToken::new("user_token_...".to_string());
//!
//! // Fetch accounts
//! let accounts = client.get_accounts(&user_token).await?;
//!
//! for account in accounts.items {
//! println!("{}: {:?} - {:.2}",
//! account.name,
//! account.kind,
//! account.balance.current
//! );
//! }
//! # Ok(())
//! # }
//! ```
//!
//! ## Authentication
//!
//! The Akahu API requires two types of tokens:
//! - **App Token**: Identifies your application (obtained from Akahu dashboard)
//! - **User Token**: Identifies the user whose data you're accessing (obtained via OAuth flow)
pub use *;
pub use AkahuClient;
pub use AkahuError;
pub use *;
pub use *;
pub use *;