highlevel_api/apis/funnels/
client.rs1use super::types::*;
2use crate::{error::Result, http::HttpClient};
3use std::sync::Arc;
4
5pub struct FunnelsApi {
6 http: Arc<HttpClient>,
7}
8
9impl FunnelsApi {
10 pub fn new(http: Arc<HttpClient>) -> Self {
11 Self { http }
12 }
13
14 pub async fn list(&self, params: &GetFunnelsParams) -> Result<GetFunnelsResponse> {
15 self.http
16 .get_with_query("/funnels/funnel/list", params)
17 .await
18 }
19
20 pub async fn get_pages(&self, params: &GetFunnelPagesParams) -> Result<GetFunnelPagesResponse> {
21 self.http.get_with_query("/funnels/page", params).await
22 }
23}