Skip to main content

bankr_agent_api/
lib.rs

1//! # bankr-agent-api
2//!
3//! Rust client library for the [Bankr Agent API](https://docs.bankr.bot/agent-api/overview).
4//!
5//! ## Quick start
6//!
7//! ```rust,no_run
8//! use bankr_agent_api::{BankrAgentClient, types::PromptRequest};
9//!
10//! # async fn example() -> Result<(), bankr_agent_api::error::BankrError> {
11//! let client = BankrAgentClient::new("your_api_key")?;
12//!
13//! // Get user profile
14//! let me = client.get_me().await?;
15//! println!("Wallets: {:?}", me.wallets);
16//!
17//! // Submit a prompt and wait for the result
18//! let req = PromptRequest { prompt: "what is the price of ETH?".to_owned(), thread_id: None };
19//! let job = client.prompt_and_wait(&req).await?;
20//! println!("Response: {:?}", job.response);
21//! # Ok(())
22//! # }
23//! ```
24
25pub mod client;
26pub mod error;
27pub mod types;
28
29// Re-export the main client type at crate root for convenience.
30pub use client::BankrAgentClient;