mod health;
mod videos;
pub use health::VisionHealth;
use reqwest::Method;
pub use videos::{
DeleteVideoArgs, DeleteVideoResponse, GetVideoArgs, ListVideosArgs, Video, VideoId,
VideoMetadata, VisionVideosClient,
};
use crate::config::ServiceBase;
use crate::{Client, Result};
#[derive(Clone)]
pub struct VisionClient {
client: Client,
}
impl VisionClient {
pub(crate) fn new(client: Client) -> Self {
Self { client }
}
pub async fn health(&self) -> Result<VisionHealth> {
self.client
.request(ServiceBase::Vision, Method::GET, "/health")
.send_json()
.await
}
pub fn videos(&self) -> VisionVideosClient {
VisionVideosClient::new(self.client.clone())
}
}