use super::super::models::BuildDefinition;
use super::super::BuildsClient;
use crate::constants::ApiPath;
use crate::error::Result;
impl BuildsClient<'_> {
/// Get a build definition by its ID.
///
/// # Arguments
///
/// * `project` — The project name.
/// * `id` — The build definition ID.
///
/// # Returns
///
/// The [`BuildDefinition`] with steps, variables, triggers, etc.
pub async fn get_definition(&self, project: &str, id: i64) -> Result<BuildDefinition> {
self.http
.get(&ApiPath::build_definition(project, id), &[])
.await
}
}