Crate zuul

Crate zuul 

Source
Expand description

This library provides a client to interface with zuul-ci.

§Installation

Add this to your Cargo.toml:

[dependencies]
zuul = "0.1"

§Example

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    // Create the client
    let client = zuul::create_client("https://zuul.example.org/api/tenant/name")
            .expect("Invalid url");

    // Print the last 20 builds
    let builds = client.builds(0, 20).await?;
    println!("{:?}", builds);
}

Checkout the zuul-build.rs example for a complete async-stream usage.

Structs§

Artifact
A Build artifact.
Build
A Build result.
Zuul
The client.

Functions§

create_client
Helper function to validate the api url and creates a client.