mirror of
https://codeberg.org/demostf/api-client.git
synced 2026-06-03 08:34:15 +02:00
add set url endpoint
This commit is contained in:
parent
3b4c2b9965
commit
7776c0ac81
3 changed files with 63 additions and 4 deletions
21
README.md
Normal file
21
README.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# api-client
|
||||
|
||||
Rust api client for demos.tf
|
||||
|
||||
## Example
|
||||
|
||||
```rust
|
||||
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(())
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue