diff --git a/README.md b/README.md index 16766ef..466bf03 100644 --- a/README.md +++ b/README.md @@ -12,21 +12,26 @@ spice-rs = { git = "https://github.com/spiceai/spice-rs", tag = "v1.0.2" } ``` ## Usage + + ### New client + ```rust -use spice_rs::Client; +use spiceai::Client; #[tokio::main] async fn main() { let mut client = Client::new("API_KEY").await.unwrap(); } ``` + ### Arrow Query + SQL Query ```rust -use spice_rs::Client; +use spiceai::Client; #[tokio::main] async fn main() { @@ -35,11 +40,13 @@ async fn main() { } ``` + ### Firecache Query + Firecache SQL Query ```rust -use spice_rs::Client; +use spiceai::Client; #[tokio::main] async fn main() { @@ -48,13 +55,15 @@ async fn main() { } ``` + ### HTTP API + #### Prices Get the supported pairs: ```rust -use spice_rs::Client; +use spiceai::Client; #[tokio::main] async fn main() { @@ -66,7 +75,7 @@ async fn main() { Get the latest price for a token pair: ```rust -use spice_rs::Client; +use spiceai::Client; #[tokio::main] async fn main() { @@ -78,7 +87,7 @@ async fn main() { Get historical data: ```rust -use spice_rs::Client; +use spiceai::Client; use chrono::Utc; use chrono::Duration; use std::ops::Sub; @@ -96,4 +105,5 @@ async fn main() { ``` ## Documentation + Check out our [Documentation](https://docs.spice.ai/sdks/rust-sdk) to learn more about how to use the Rust SDK. diff --git a/src/client.rs b/src/client.rs index 8f982bb..9c80701 100644 --- a/src/client.rs +++ b/src/client.rs @@ -52,7 +52,7 @@ pub struct SpiceClient { impl SpiceClient { /// Creates a new SpiceClient with the given API key. /// ``` - /// use spice_rs::Client; + /// use spiceai::Client; /// /// #[tokio::main] /// async fn main() { @@ -71,7 +71,7 @@ impl SpiceClient { /// Queries the Spice Flight endpoint with the given SQL query. /// ``` - /// # use spice_rs::Client; + /// # use spiceai::Client; /// # /// # #[tokio::main] /// # async fn main() { @@ -85,7 +85,7 @@ impl SpiceClient { /// Queries the Spice Firecache endpoint with the given SQL query. /// ``` - /// # use spice_rs::Client; + /// # use spiceai::Client; /// # /// # #[tokio::main] /// # async fn main() { @@ -102,7 +102,7 @@ impl SpiceClient { /// Get the supported pairs: /// ```rust - /// # use spice_rs::Client; + /// # use spiceai::Client; /// # /// # #[tokio::main] /// # async fn main() { @@ -116,7 +116,7 @@ impl SpiceClient { /// Get the latest price for a token pair: /// ```rust - /// # use spice_rs::Client; + /// # use spiceai::Client; /// # /// # #[tokio::main] /// # async fn main() { @@ -130,7 +130,7 @@ impl SpiceClient { /// Get historical data: /// ```rust - /// # use spice_rs::Client; + /// # use spiceai::Client; /// # use chrono::Utc; /// # use chrono::Duration; /// # use std::ops::Sub; diff --git a/tests/client_test.rs b/tests/client_test.rs index 1a86dec..f5e399c 100644 --- a/tests/client_test.rs +++ b/tests/client_test.rs @@ -1,7 +1,7 @@ #[cfg(test)] mod tests { use futures::stream::StreamExt; - use spice_rs::Client; + use spiceai::Client; use std::env; use std::path::Path; diff --git a/tests/price_test.rs b/tests/price_test.rs index e1494d9..ff7a4e4 100644 --- a/tests/price_test.rs +++ b/tests/price_test.rs @@ -1,7 +1,7 @@ #[cfg(test)] mod tests { use chrono::{TimeZone, Utc}; - use spice_rs::Client; + use spiceai::Client; use std::env; use std::path::Path; diff --git a/tests/readme_test.rs b/tests/readme_test.rs index d49553e..04523db 100644 --- a/tests/readme_test.rs +++ b/tests/readme_test.rs @@ -1,7 +1,7 @@ #[cfg(test)] mod tests { use chrono::{Duration, Utc}; - use spice_rs::*; + use spiceai::*; use std::env; use std::ops::Sub; use std::path::Path;