bodhi 2.2.0

bodhi REST API client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use bodhi::{BodhiClientBuilder, CSRFQuery};

#[tokio::main]
async fn main() -> Result<(), String> {
    // construct bodhi client for the production instance
    let bodhi = BodhiClientBuilder::default().build().await.unwrap();

    let query = CSRFQuery::new();

    let token = bodhi.request(&query).await.map_err(|error| error.to_string())?;

    println!("CSRF token: {token}");

    Ok(())
}