reka 0.1.0

Async Rust SDK for the Reka API.
Documentation
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};

/// Handle for the vision APIs.
#[derive(Clone)]
pub struct VisionClient {
    client: Client,
}

impl VisionClient {
    pub(crate) fn new(client: Client) -> Self {
        Self { client }
    }

    /// Returns the vision service health response.
    pub async fn health(&self) -> Result<VisionHealth> {
        self.client
            .request(ServiceBase::Vision, Method::GET, "/health")
            .send_json()
            .await
    }

    /// Returns a handle for vision video operations.
    pub fn videos(&self) -> VisionVideosClient {
        VisionVideosClient::new(self.client.clone())
    }
}