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
//! # UniRate API — Rust client
//!
//! Official Rust client for the [UniRate API](https://unirateapi.com) — free,
//! real-time and historical currency exchange rates plus VAT rates.
//!
//! ## Quick start
//!
//! ```no_run
//! use unirate_api::Client;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let client = Client::new("your-api-key");
//!
//! let rate = client.get_rate("USD", "EUR").await?;
//! println!("USD → EUR: {}", rate);
//!
//! let converted = client.convert(100.0, "USD", "EUR").await?;
//! println!("100 USD = {} EUR", converted);
//!
//! Ok(())
//! }
//! ```
//!
//! Get a free API key at <https://unirateapi.com>.
pub use ;
pub use UniRateError;
pub use ;
/// Default UniRate API base URL.
pub const DEFAULT_BASE_URL: &str = "https://api.unirateapi.com";
/// Crate version, exposed as the `User-Agent` suffix.
pub const VERSION: &str = env!;