# stadar — Rust SDK for the esports-api
Auto-generated from [the OpenAPI 3.1 spec](https://api.stadar.net/v1/openapi.yaml) via `openapi-generator`. Async via `reqwest`. Rust 1.78+.
## Install
```toml
# Cargo.toml
[dependencies]
stadar = "0.1"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
```
## Use
```rust
use stadar::from_env::from_env;
use stadar::apis::games_api::list_games;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let cfg = from_env()?; // reads STADAR_API_KEY
let games = list_games(&cfg, None).await?;
println!("{:#?}", games);
Ok(())
}
```
## Webhook signature verification
```rust
use stadar::webhooks::verify;
if verify(&body, signature_header, &secret).is_err() {
return http::StatusCode::UNAUTHORIZED.into_response();
}
```
## Publishing
`.github/workflows/sdk-publish.yml` runs on git tag `sdk-rust-v*` and pushes to crates.io via `cargo publish` (requires `CRATES_IO_TOKEN` GitHub secret).
## Regenerating
```bash
scripts/generate-sdks.sh
```