fundaia 0.55.0

Command line for the Fundaia deployment platform: projects, services, variables, deployments, logs and metrics
use super::*;

impl ApiClient {
    pub async fn deployment_feed(
        &self,
        scope: &str,
        limit: usize,
    ) -> Result<Answer<DeploymentFeed>> {
        self.get_answer(&format!(
            "/api/infra/deployments?scope={scope}&limit={limit}"
        ))
        .await
    }

    pub async fn status_page(&self, project_id: &str) -> Result<Answer<StatusPageAnswer>> {
        self.get_answer(&format!("/api/infra/projects/{project_id}/status-page"))
            .await
    }

    pub async fn set_status_page(
        &self,
        project_id: &str,
        change: &StatusPageChange,
    ) -> Result<Answer<StatusPageAnswer>> {
        self.answer(
            Method::PUT,
            &format!("/api/infra/projects/{project_id}/status-page"),
            Some(change),
        )
        .await
    }
}