objectiveai_sdk/agent/
http.rs1use crate::{HttpClient, HttpError};
4
5pub async fn list_agents(
7 client: &HttpClient,
8 params: super::request::ListAgentsRequest,
9) -> Result<super::response::ListAgentResponse, HttpError> {
10 client
11 .send_unary(reqwest::Method::POST, "agents/list", Some(params))
12 .await
13}
14
15pub async fn get_agent(
17 client: &HttpClient,
18 params: super::request::GetAgentRequest,
19) -> Result<super::response::GetAgentResponse, HttpError> {
20 client
21 .send_unary(reqwest::Method::POST, "agents", Some(params))
22 .await
23}
24
25pub async fn get_agent_usage(
27 client: &HttpClient,
28 params: super::request::GetAgentRequest,
29) -> Result<super::response::UsageAgentResponse, HttpError> {
30 client
31 .send_unary(reqwest::Method::POST, "agents/usage", Some(params))
32 .await
33}