diff --git a/internal/api/photos.go b/internal/api/photos.go index 80db083a7..6f3e856bf 100644 --- a/internal/api/photos.go +++ b/internal/api/photos.go @@ -11,20 +11,20 @@ import ( "github.com/photoprism/photoprism/internal/photoprism" ) -// `GET /api/v1/photos` +// GET /api/v1/photos // // Query: -// - `q`: string Query string `form:""` -// - `tags`: string Tags string `form:"tags"` -// - `cat`: string Category -// - `country`: string Country code -// - `camera`: int Camera ID -// - `order`: string Sort order -// - `count`: int Max result count (required) -// - `offset`: int Result offset -// - `before`: date Find photos taken before (format: "2006-01-02") -// - `after`: date Find photos taken after (format: "2006-01-02") -// - `favorites`: bool Find favorites only +// q: string Query string +// tags: string Tags +// cat: string Category +// country: string Country code +// camera: int Camera ID +// order: string Sort order +// count: int Max result count (required) +// offset: int Result offset +// before: date Find photos taken before (format: "2006-01-02") +// after: date Find photos taken after (format: "2006-01-02") +// favorites: bool Find favorites only func GetPhotos(router *gin.RouterGroup, conf *photoprism.Config) { router.GET("/photos", func(c *gin.Context) { var form forms.PhotoSearchForm @@ -46,10 +46,10 @@ func GetPhotos(router *gin.RouterGroup, conf *photoprism.Config) { }) } -// `POST /api/v1/photos/:photoId/like` +// POST /api/v1/photos/:photoId/like // // Parameters: -// - `photoId`: Photo ID as returned by the API +// photoId: int Photo ID as returned by the API func LikePhoto(router *gin.RouterGroup, conf *photoprism.Config) { router.POST("/photos/:photoId/like", func(c *gin.Context) { search := photoprism.NewSearch(conf.OriginalsPath, conf.GetDb()) @@ -68,10 +68,10 @@ func LikePhoto(router *gin.RouterGroup, conf *photoprism.Config) { }) } -// `DELETE /api/v1/photos/:photoId/like` +// DELETE /api/v1/photos/:photoId/like // // Parameters: -// - `photoId`: Photo ID as returned by the API +// photoId: int Photo ID as returned by the API func DislikePhoto(router *gin.RouterGroup, conf *photoprism.Config) { router.DELETE("/photos/:photoId/like", func(c *gin.Context) { search := photoprism.NewSearch(conf.OriginalsPath, conf.GetDb()) diff --git a/internal/api/thumbnails.go b/internal/api/thumbnails.go index e955a8927..3d1d0f315 100644 --- a/internal/api/thumbnails.go +++ b/internal/api/thumbnails.go @@ -15,12 +15,12 @@ var photoIconSvg = []byte(` `) -// `GET /api/v1/thumbnails/:type/:size/:hash` +// GET /api/v1/thumbnails/:type/:size/:hash // // Parameters: -// - `type`: string Format, either "fit" or "square" -// - `size`: int Size in pixels -// - `hash`: string The file hash as returned by the search API +// type: string Format, either "fit" or "square" +// size: int Size in pixels +// hash: string The file hash as returned by the search API func GetThumbnail(router *gin.RouterGroup, conf *photoprism.Config) { router.GET("/thumbnails/:type/:size/:hash", func(c *gin.Context) { fileHash := c.Param("hash")