Add get for author images

This commit is contained in:
Nicholas Wallace 2024-05-14 03:26:51 +00:00
parent c8c25841c9
commit 8c2073c10a

View file

@ -208,14 +208,43 @@ paths:
'404': '404':
$ref: '#/components/responses/author404' $ref: '#/components/responses/author404'
/api/authors/{id}/image: /api/authors/{id}/image:
get:
operationId: getAuthorImageById
summary: Get an author image by author ID
description: Get an author image by author ID. The image will be returned in the requested format and size.
tags:
- Authors
parameters:
$ref: '#/components/parameters/authorId'
requestBody:
$ref: '#/components/requestBody/imageWidth'
$ref: '#/components/requestBody/imageHeight'
$ref: '#/components/requestBody/imageFormat'
$ref: '#/components/requestBody/imageRaw'
responses:
'200':
description: getAuthorImageById OK
content:
image/webp:
schema:
type: string
format: binary
image/jpeg:
schema:
type: string
format: binary
image/*:
schema:
type: string
format: binary
'404':
$ref: '#/components/responses/author404'
post: post:
operationId: addAuthorImageById operationId: addAuthorImageById
summary: Add an author image to the server summary: Add an author image to the server
description: Add an author image to the server. The image will be downloaded from the provided URL and stored on the server. description: Add an author image to the server. The image will be downloaded from the provided URL and stored on the server.
tags: tags:
- Authors - Authors
parameters:
$ref: '#/components/parameters/authorId'
requestBody: requestBody:
$ref: '#/components/requestBody/imageUrl' $ref: '#/components/requestBody/imageUrl'
requestBody: requestBody: