systemprompt_cloud/api_client/
endpoints.rs1use systemprompt_models::modules::ApiPaths;
7
8use super::CloudApiClient;
9use super::types::{CloudListResponse, CloudTenant, UserMeResponse};
10use crate::error::CloudResult;
11
12impl CloudApiClient {
13 pub async fn get_user(&self) -> CloudResult<UserMeResponse> {
14 self.get(ApiPaths::AUTH_ME).await
15 }
16
17 pub async fn list_tenants(&self) -> CloudResult<Vec<CloudTenant>> {
18 let response: CloudListResponse<CloudTenant> = self.get(ApiPaths::CLOUD_TENANTS).await?;
19 Ok(response.data)
20 }
21}