use nexus_sdk::*;
#[tokio::main]
async fn main() -> Result<()> {
tracing::info!("Example 1: API Key Authentication");
let client = NexusClient::with_api_key("http://localhost:15474", "your-api-key")?;
let healthy = client.health_check().await?;
tracing::info!("Server is healthy: {}", healthy);
tracing::info!("\nExample 2: Username/Password Authentication");
let client = NexusClient::with_credentials("http://localhost:15474", "user", "pass")?;
let _stats = client.get_stats().await?;
tracing::info!("Database stats retrieved successfully");
tracing::info!("\nExample 3: Custom Configuration");
let client = NexusClient::with_api_key("http://localhost:15474", "custom-api-key")?;
let result = client.execute_cypher("RETURN 1 as test", None).await?;
tracing::info!("Query executed successfully: {:?}", result);
Ok(())
}