nextcloud_preview/lib.rs
1//! Nextcloud Preview and Thumbnail API client and domain types.
2//!
3//! Nextcloud provides an endpoint for generating on-demand file previews and thumbnails
4//! at `/core/preview.png` (routed via `/index.php/core/preview.png`).
5//!
6//! - [`PreviewClient`] — asynchronous client for fetching image previews.
7//! - [`PreviewOptions`] — builder for dimension, aspect ratio, and mode parameters.
8//! - [`PreviewMode`] — scaling mode (`Cover` or `Fill`).
9//!
10//! Official Nextcloud Preview endpoint:
11//! `GET /core/preview.png?fileId={fileId}&x={x}&y={y}&a={a}&mode={mode}` or
12//! `GET /core/preview.png?file={filePath}&x={x}&y={y}`.
13#![deny(missing_docs)]
14#![forbid(unsafe_code)]
15
16mod client;
17mod mode;
18mod options;
19mod query;
20
21pub use client::{PREVIEW_ENDPOINT, PreviewClient};
22pub use mode::PreviewMode;
23pub use options::PreviewOptions;