use super::super::models::Build;
use super::super::BuildsClient;
use crate::constants::ApiPath;
use crate::error::Result;
impl BuildsClient<'_> {
/// Queue a new build.
///
/// # Arguments
///
/// * `project` — The project name.
/// * `build` — The [`Build`] object describing the build to queue.
///
/// # Returns
///
/// The queued [`Build`].
pub async fn queue(&self, project: &str, build: &Build) -> Result<Build> {
self.http
.post(&ApiPath::builds(project), &[], Some(build))
.await
}
}