Report: Add examples and notes for filter report

This commit is contained in:
theresa 2022-04-14 17:00:55 +02:00
parent ccedda8f21
commit 443c0d789f

View file

@ -8,15 +8,15 @@ import (
type SearchPhotos struct { type SearchPhotos struct {
Query string `form:"q"` Query string `form:"q"`
Filter string `form:"filter" notes:"-"` Filter string `form:"filter" notes:"-"`
UID string `form:"uid"` UID string `form:"uid" example:"uid:pqbcf5j446s0futy"`
Type string `form:"type"` Type string `form:"type" example:"type:raw" notes:"Can be combined with |. Options: image, video, raw, live, animated"`
Path string `form:"path"` Path string `form:"path" example:"path:2020/Holiday, path:\"*/2020\"" notes:"Same as folder. Can be combined with |."`
Folder string `form:"folder"` // Alias for Path Folder string `form:"folder" example:"folder:2020/Holiday, folder:\"*/2020\"" notes:"Same as path. Can be combined with |."` // Alias for Path
Name string `form:"name"` Name string `form:"name" example:"name:\"IMG_9831-112\", name:\"IMG_9831-112*\"" notes:"Can be combined with |."`
Filename string `form:"filename"` Filename string `form:"filename" example:"filename:\"2021/07/12345.jpg\"" notes:"Can be combined with |."`
Original string `form:"original"` Original string `form:"original" example:"original:\"IMG_9831-112\", original:\"IMG_9831-112*\"" notes:"Can be combined with |. Only applicable when files have been imported"`
Title string `form:"title"` Title string `form:"title" example:"title:\"Lake*\"" notes:"Can be combined with |."`
Hash string `form:"hash" example:"hash:2fd4e1c67a2d"` Hash string `form:"hash" example:"hash:2fd4e1c67a2d" notes:"Can be combined with |."`
Primary bool `form:"primary"` Primary bool `form:"primary"`
Stack bool `form:"stack"` Stack bool `form:"stack"`
Unstacked bool `form:"unstacked"` Unstacked bool `form:"unstacked"`
@ -41,40 +41,40 @@ type SearchPhotos struct {
Unsorted bool `form:"unsorted"` Unsorted bool `form:"unsorted"`
Lat float32 `form:"lat"` Lat float32 `form:"lat"`
Lng float32 `form:"lng"` Lng float32 `form:"lng"`
Dist uint `form:"dist"` Dist uint `form:"dist" notes:"Distance to coordinates (radius in kilometre). Only applicable in combination with the lat/lng filters."`
Fmin float32 `form:"fmin"` Fmin float32 `form:"fmin"`
Fmax float32 `form:"fmax"` Fmax float32 `form:"fmax"`
Chroma uint8 `form:"chroma"` Chroma uint8 `form:"chroma"`
Diff uint32 `form:"diff"` Diff uint32 `form:"diff"`
Mono bool `form:"mono"` Mono bool `form:"mono"`
Geo bool `form:"geo"` Geo bool `form:"geo"`
Keywords string `form:"keywords"` // Filter by keyword(s) Keywords string `form:"keywords" example:"keywords:\"buffalo&water\"" notes:"Keywords can be combined with & and |"` // Filter by keyword(s)
Label string `form:"label"` // Label name Label string `form:"label" example:"label:cat|dog" notes:"Can be combined with |."` // Label name
Category string `form:"category"` // Moments Category string `form:"category"` // Moments
Country string `form:"country"` // Moments Country string `form:"country" example:"country:\"de|us\"" notes:"Can be combined with |."` // Moments
State string `form:"state"` // Moments State string `form:"state" example:"state:\"Baden-Württemberg\"" notes:"Can be combined with |."` // Moments
Year string `form:"year"` // Moments Year string `form:"year" example:"year:1990|2003" notes:"Can be combined with |."` // Moments
Month string `form:"month"` // Moments Month string `form:"month" example:"month:7|10" notes:"Can be combined with |."` // Moments
Day string `form:"day"` // Moments Day string `form:"day" example:"day:3|13" notes:"Can be combined with |."` // Moments
Face string `form:"face"` // UIDs Face string `form:"face"` // UIDs
Subject string `form:"subject"` // UIDs Subject string `form:"subject" example:"subject:\"Jane Doe & John Doe\"" notes:"Same as person. Only exact matches. Names can be combined with & and |"` // UIDs
Person string `form:"person"` // Alias for Subject Person string `form:"person" example:"person:\"Jane Doe & John Doe\"" notes:"Same as subject. Only exact matches. Names can be combined with & and |"` // Alias for Subject
Subjects string `form:"subjects"` // People names Subjects string `form:"subjects" example:"subjects:\"Jane & John\"" notes:"Same as people. Names can be combined with & and |"` // People names
People string `form:"people"` // Alias for Subjects People string `form:"people" example:"people:\"Jane & John\"" notes:"Same as subjects. Names can be combined with & and |"` // Alias for Subjects
Album string `form:"album" notes:"Single name with * wildcard"` // Album UIDs or name Album string `form:"album" example:"album:berlin" notes:"Single name with * wildcard"` // Album UIDs or name
Albums string `form:"albums" example:"albums:\"South Africa & Birds\"" notes:"Album names can be combined with & and |"` // Multi search with and/or Albums string `form:"albums" example:"albums:\"South Africa & Birds\"" notes:"Album names can be combined with & and |"` // Multi search with and/or
Color string `form:"color"` // Main color Color string `form:"color" example:"color:\"red|blue\"" notes:"Can be combined with |. Options: purple, magenta, pink, red, orange, gold, yellow, lime, green, teal, cyan, blue, brown, white, grey, black"` // Main color
Faces string `form:"faces"` // Find or exclude faces if detected. Faces string `form:"faces" example:"faces:yes faces:no faces:3" notes:"3 means minimum 3 faces"` // Find or exclude faces if detected.
Quality int `form:"quality"` // Photo quality score Quality int `form:"quality" notes:"Options: 0, 1, 2, 3, 4, 5"` // Photo quality score
Review bool `form:"review"` // Find photos in review Review bool `form:"review"` // Find photos in review
Camera string `form:"camera" example:"camera:canon"` // Camera UID or name Camera string `form:"camera" example:"camera:canon"` // Camera UID or name
Lens string `form:"lens" example:"lens:ef24"` // Lens UID or name Lens string `form:"lens" example:"lens:ef24"` // Lens UID or name
Before time.Time `form:"before" time_format:"2006-01-02" notes:"Taken before this date"` // Finds images taken before date Before time.Time `form:"before" time_format:"2006-01-02" notes:"Taken before this date"` // Finds images taken before date
After time.Time `form:"after" time_format:"2006-01-02" notes:"Taken after this date"` // Finds images taken after date After time.Time `form:"after" time_format:"2006-01-02" notes:"Taken after this date"` // Finds images taken after date
Count int `form:"count" binding:"required" serialize:"-"` // Result FILE limit Count int `form:"count" binding:"required" serialize:"-"` // Result FILE limit
Offset int `form:"offset" serialize:"-"` // Result FILE offset Offset int `form:"offset" serialize:"-"` // Result FILE offset
Order string `form:"order" serialize:"-"` // Sort order Order string `form:"order" serialize:"-"` // Sort order
Merged bool `form:"merged" serialize:"-"` // Merge FILES in response Merged bool `form:"merged" serialize:"-"` // Merge FILES in response
} }
func (f *SearchPhotos) GetQuery() string { func (f *SearchPhotos) GetQuery() string {