Skip to main content

highlevel_api/apis/companies/
client.rs

1use super::types::*;
2use crate::{error::Result, http::HttpClient};
3use std::sync::Arc;
4
5pub struct CompaniesApi {
6    http: Arc<HttpClient>,
7}
8
9impl CompaniesApi {
10    pub fn new(http: Arc<HttpClient>) -> Self {
11        Self { http }
12    }
13
14    pub async fn get(&self, company_id: &str) -> Result<GetCompanyResponse> {
15        self.http.get(&format!("/companies/{company_id}")).await
16    }
17}