openapp_sdk_core/resources/
status.rs1use std::sync::Arc;
4
5use reqwest::Method;
6
7use super::types;
8use crate::{
9 error::SdkError,
10 transport::{RequestSpec, Transport},
11};
12
13#[derive(Debug, Clone)]
14pub struct StatusClient {
15 transport: Arc<Transport>,
16}
17
18impl StatusClient {
19 pub(crate) fn new(transport: Arc<Transport>) -> Self {
20 Self { transport }
21 }
22
23 pub async fn get(&self) -> Result<types::BackendStatus, SdkError> {
25 self.transport
26 .request_json::<(), types::BackendStatus>(RequestSpec {
27 method: Method::GET,
28 path: "/status",
29 ..Default::default()
30 })
31 .await
32 }
33}