tetr-ch-rs is a Rust library for the TETRA CHANNEL API.
You can get the following from the TETRA CHANNEL API with this library:
But TETRA CHANNEL API is alpha version. So this library may not work properly in the future:(
Add the following to your Cargo.toml
file:
toml
[dependencies]
tetr_ch = "0.2.0"
The following example is a template for getting user details.
```rust use tetr_ch::client::Client;
async fn main() { // Set the user (name or id). let user = "rinrin-rs";
// Create a new client.
let client = Client::new();
// Get the user details.
// And send the requested data or error message.
match client.get_user(user).await {
Ok(u) => {
println!("{:?}\n", u);
}
Err(err) => {
eprintln!("Error: {}\n", err.to_string());
}
}
} ```
See full examples.
And see the docs.