mirror of
https://codeberg.org/demostf/api-client.git
synced 2026-04-21 15:22:44 +02:00
Rust api client for demos.tf
- Rust 82.9%
- Nix 15.5%
- Shell 1.6%
| .forgejo/workflows | ||
| nix | ||
| src | ||
| tests | ||
| .envrc | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE-APACHE | ||
| LICENSE-MIT | ||
| README.md | ||
| start_test_server.sh | ||
api-client
Rust api client for demos.tf
Example
use demostf_client::{ListOrder, ListParams, ApiClient};
#[tokio::main]
async fn main() -> Result<(), demostf_client::Error> {
let client = ApiClient::new();
let demos = client.list(ListParams::default().with_order(ListOrder::Ascending), 1).await?;
for demo in demos {
println!("{}: {}", demo.id, demo.name);
}
Ok(())
}