myust 1.0.9

A rich and hybrid mystb.in API wrapper for Rust 🦀
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use myust::Client;

#[tokio::test]
async fn main() {
    let client = Client::new()
        .auth(std::env::var("MYSTBIN_TOKEN").unwrap())
        .await;
    let result = client.delete_paste("EquipmentMovingExpensive").await; // The paste ID to delete
    match result {
        Ok(_) => println!("Successfully deleted the paste."),
        Err(_) => {
            println!("Error code: {}", result.unwrap_err().code)
        }
    }
}