use crate::error::Error;
use crate::http::HttpClient;
use crate::types::common::RequestOptions;
use crate::api_spec::{ExtractImageRequest, ExtractImageResponse};
#[derive(Debug, Clone)]
pub struct ImageExtractionClient {
http: HttpClient,
}
impl ImageExtractionClient {
pub(crate) fn new(http: HttpClient) -> Self {
Self { http }
}
pub async fn extract_image(
&self,
request: ExtractImageRequest,
options: Option<&RequestOptions>,
) -> Result<ExtractImageResponse, Error> {
self.http.post("/extract/image", &request, options).await
}
}