highlevel-api 0.2.0

Unofficial Rust SDK for the GoHighLevel (HighLevel) API
Documentation
use super::types::*;
use crate::{error::Result, http::HttpClient};
use std::sync::Arc;

pub struct BlogsApi {
    http: Arc<HttpClient>,
}

impl BlogsApi {
    pub fn new(http: Arc<HttpClient>) -> Self {
        Self { http }
    }

    pub async fn get_posts(&self, params: &GetBlogPostsParams) -> Result<GetBlogPostsResponse> {
        self.http.get_with_query("/blogs/posts", params).await
    }

    pub async fn get_sites(&self, params: &GetBlogSitesParams) -> Result<GetBlogSitesResponse> {
        self.http.get_with_query("/blogs/site", params).await
    }
}