Skip to main content

boj_client/
lib.rs

1//! `boj-client` is a Rust client for the Bank of Japan time-series statistics API.
2//!
3//! This crate provides:
4//! - request builders for each BOJ endpoint under [`query`],
5//! - a synchronous API client under [`client`],
6//! - strongly-typed response models under [`model`],
7//! - shared error definitions under [`error`].
8//!
9//! Internal transport/decoder details are intentionally hidden from the
10//! external API surface. The recommended starting point is [`client::BojClient`].
11//!
12//! ```compile_fail
13//! use boj_client::decode::decode_code;
14//! use boj_client::retry::should_retry;
15//! use boj_client::transport::ReqwestTransport;
16//! ```
17
18#![deny(missing_docs)]
19#![deny(rustdoc::broken_intra_doc_links)]
20#![deny(rustdoc::bare_urls)]
21
22/// Static discovery catalog derived from BOJ API manual appendices.
23pub mod catalog;
24/// BOJ API client entry point.
25pub mod client;
26/// Error definitions shared across query, transport, and decode layers.
27pub mod error;
28/// Public response model types.
29pub mod model;
30/// Query builders and option enums for BOJ API requests.
31pub mod query;
32
33mod decode;
34mod transport;