systemprompt_client/lib.rs
1//! HTTP API client for systemprompt.io deployments.
2//!
3//! The crate exposes a single type, [`SystempromptClient`], which wraps a
4//! pre-configured [`reqwest::Client`] and a small set of typed methods for the
5//! routes documented in `systemprompt-models::ApiPaths`. All errors flow
6//! through the [`ClientError`] enum.
7//!
8//! # Feature flags
9//!
10//! This crate has no feature flags. `[package.metadata.docs.rs] all-features`
11//! is set so future additions render on docs.rs without further changes.
12//!
13//! # Example
14//!
15//! ```no_run
16//! use systemprompt_client::SystempromptClient;
17//!
18//! # async fn run() -> systemprompt_client::ClientResult<()> {
19//! let client = SystempromptClient::new("https://api.example.com")?;
20//! let healthy = client.check_health().await;
21//! assert!(healthy);
22//! # Ok(()) }
23//! ```
24
25mod client;
26mod error;
27mod http;
28
29pub use client::SystempromptClient;
30pub use error::{ClientError, ClientResult};