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
//! Dune Analytics API client for Rust
//!
//! An unofficial Rust client for the [Dune Analytics API](https://docs.dune.com/api-reference).
//!
//! # Example
//!
//! ```no_run
//! # async fn example() -> dune::error::Result<()> {
//! let client = dune::Client::new("your-api-key")?;
//!
//! // Execute a query and wait for results
//! let result = client.executions().run_query(1234, None).await?;
//! for row in result.result.unwrap().rows {
//! println!("{:?}", row);
//! }
//!
//! // Execute raw SQL
//! let result = client.executions().run_sql("SELECT 1 as value", None).await?;
//! println!("{:?}", result.result);
//!
//! // Get cached results for a query
//! let result = client.executions().query_results(1234).await?;
//! println!("{:?}", result.result);
//! # Ok(())
//! # }
//! ```
//!
//! # Features
//!
//! - **Queries**: Create, read, update, archive/unarchive queries
//! - **Executions**: Execute queries, run SQL, get results (JSON or CSV)
//! - **Tables**: Upload data, create tables, insert rows
//! - **Materialized Views**: Create, refresh, manage materialized views
//! - **Pipelines**: Execute coordinated query workflows
//! - **Usage**: Track API consumption and credits
pub use ;
pub use ;
pub use HttpClientConfig;
pub use ;
/// Default base URL for the Dune Analytics API
pub const DEFAULT_BASE_URL: &str = "https://api.dune.com/api";
/// Create a config with an API key