Rustaceans, we have an official SDK for you!

Getting started

  1. Ensure you have tokio added as a dependency. The SDK relies on Tokio for executing async code.

    cargo add tokio --features full
    
  2. Add the streamstore dependency to your project:

    cargo add streamstore
    
  3. Generate an authentication token by logging onto the web console at s2.dev.

  4. Make a request using SDK client.

    #[tokio::main]
    async fn main() -> Result<(), Box<dyn std::error::Error>> {
        let config = s2::ClientConfig::new("<YOUR AUTH TOKEN>");
        let client = s2::Client::new(config);
    
        let basins = client.list_basins(Default::default()).await?;
        println!("My basins: {:?}", basins);
    
        Ok(())
    }