koios_sdk/api/mod.rs
1//! API endpoint implementations
2//!
3//! This module contains implementations for all Koios API endpoints, organized by category.
4//! These implementations work across all supported networks (Mainnet, Preprod, Preview, Guild).
5//!
6//! - [`account`] - Stake account related endpoints
7//! - [`address`] - Address related endpoints
8//! - [`asset`] - Asset and token related endpoints
9//! - [`block`] - Block related endpoints
10//! - [`epoch`] - Epoch related endpoints
11//! - [`governance`] - Governance related endpoints
12//! - [`network`] - Network related endpoints
13//! - [`ogmios`] - Ogmios v6 integration endpoints
14//! - [`pool`] - Stake pool related endpoints
15//! - [`script`] - Script related endpoints
16//! - [`transaction`] - Transaction related endpoints
17//!
18//! # Examples
19//!
20//! Fetching account info on Mainnet:
21//!
22//! ```rust,no_run
23//! use koios_sdk::Client;
24//!
25//! #[tokio::main]
26//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
27//! let client = Client::new()?;
28//! let stake_addresses = vec![
29//! "stake1ux3g2c9dx2nhhehyrezyxpkstartcqmu9hk63qgfkccw5rqttygt7".to_string()
30//! ];
31//! let account_info = client.get_account_info(&stake_addresses).await?;
32//! println!("Account info: {:?}", account_info);
33//! Ok(())
34//! }
35//! ```
36//!
37//! Fetching account info on Preprod network:
38//!
39//! ```rust,no_run
40//! use koios_sdk::{Client, Network};
41//!
42//! #[tokio::main]
43//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
44//! let client = Client::builder()
45//! .network(Network::Preprod)
46//! .build()?;
47//!
48//! let stake_addresses = vec![
49//! "stake_test1ux3g2c9dx2nhhehyrezyxpkstartcqmu9hk63qgfkccw5rqttygt7".to_string()
50//! ];
51//! let account_info = client.get_account_info(&stake_addresses).await?;
52//! println!("Account info: {:?}", account_info);
53//! Ok(())
54//! }
55//! ```
56
57pub mod account;
58pub mod address;
59pub mod asset;
60pub mod block;
61pub mod epoch;
62pub mod governance;
63pub mod network;
64pub mod ogmios;
65pub mod pool;
66pub mod script;
67pub mod transaction;