Use PhotoSize enum in file requests
This commit is contained in:
@@ -103,7 +103,8 @@ pub struct PhotosResponse {
|
||||
#[derive(Deserialize)]
|
||||
pub struct FilesRequest {
|
||||
pub path: String,
|
||||
pub tag_ids: Option<String>, // comma separated numbers
|
||||
// comma separated numbers
|
||||
pub tag_ids: Option<String>,
|
||||
pub tag_filter_mode: Option<FilterMode>,
|
||||
pub recursive: Option<bool>,
|
||||
}
|
||||
@@ -114,10 +115,17 @@ pub enum FilterMode {
|
||||
All,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Deserialize, PartialEq, Debug)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum PhotoSize {
|
||||
Full,
|
||||
Thumb,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct ThumbnailRequest {
|
||||
pub path: String,
|
||||
pub size: Option<String>,
|
||||
pub size: Option<PhotoSize>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user