pub struct Client { /* private fields */ }Expand description
The main entry point for the Cognitum API.
Create a Client with Client::new (minimal), Client::with_config
(full control, panics on build failure), or Client::builder (fallible,
supports TLS knobs).
Implementations§
Source§impl Client
impl Client
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Start configuring a new Client via the fluent builder.
Sourcepub fn with_config(config: ClientConfig) -> Self
pub fn with_config(config: ClientConfig) -> Self
Create a client with full configuration control.
Panics if the underlying reqwest::Client fails to build. Use
Client::try_with_config or Client::builder for a fallible path.
Sourcepub fn try_with_config(config: ClientConfig) -> Result<Self, Error>
pub fn try_with_config(config: ClientConfig) -> Result<Self, Error>
Fallible variant of Client::with_config.
Sourcepub fn config(&self) -> &ClientConfig
pub fn config(&self) -> &ClientConfig
Read-only view of the effective configuration. Useful for tests and for callers that want to log the resolved settings.
Sourcepub fn catalog(&self) -> CatalogResource<'_>
pub fn catalog(&self) -> CatalogResource<'_>
Access the catalog API.
Sourcepub fn orders(&self) -> OrdersResource<'_>
pub fn orders(&self) -> OrdersResource<'_>
Access the orders API.
Sourcepub fn leads(&self) -> LeadsResource<'_>
pub fn leads(&self) -> LeadsResource<'_>
Access the leads API.
Sourcepub fn contact(&self) -> ContactResource<'_>
pub fn contact(&self) -> ContactResource<'_>
Access the contact API.
Sourcepub fn devices(&self) -> DevicesResource<'_>
pub fn devices(&self) -> DevicesResource<'_>
Access the devices API.
Sourcepub fn mcp(&self) -> McpResource<'_>
pub fn mcp(&self) -> McpResource<'_>
Access the MCP tools API.
Sourcepub fn brain(&self) -> BrainResource<'_>
pub fn brain(&self) -> BrainResource<'_>
Access the brain / knowledge API.
Sourcepub async fn health(&self) -> Result<HealthResponse, Error>
pub async fn health(&self) -> Result<HealthResponse, Error>
Perform a health check against the API.