mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-21 23:12:58 +01:00
* refactor: move post uploads to post hash * test: add uploads to api definition * refactor: move thumbs to topic hash * chore: up composer * refactor: dont use old zset
134 lines
3.5 KiB
YAML
134 lines
3.5 KiB
YAML
get:
|
|
tags:
|
|
- topics
|
|
summary: get topic thumbnails
|
|
description: This operation retrieves a topic's uploaded thumbnails
|
|
parameters:
|
|
- in: path
|
|
name: tid
|
|
schema:
|
|
type: string
|
|
required: true
|
|
description: a valid topic id
|
|
example: 1
|
|
- in: query
|
|
name: thumbsOnly
|
|
schema:
|
|
type: boolean
|
|
required: false
|
|
description: "(default: false) exclude post attachments, uploaded media, and those added by plugins"
|
|
example: 0
|
|
responses:
|
|
'200':
|
|
description: Thumbnails successfully retrieved
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
status:
|
|
$ref: ../../../components/schemas/Status.yaml#/Status
|
|
response:
|
|
type: array
|
|
description: A list of the topic thumbnails that still remain
|
|
items:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
path:
|
|
type: string
|
|
url:
|
|
type: string
|
|
description: Path to a topic thumbnail
|
|
post:
|
|
tags:
|
|
- topics
|
|
summary: add topic thumbnail
|
|
description: This operation adds a thumbnail to an existing topic or a draft (via a composer `uuid`)
|
|
parameters:
|
|
- in: path
|
|
name: tid
|
|
schema:
|
|
type: string
|
|
required: true
|
|
description: a valid topic id
|
|
example: 1
|
|
requestBody:
|
|
content:
|
|
multipart/form-data:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
files:
|
|
type: array
|
|
items:
|
|
type: string
|
|
format: binary
|
|
responses:
|
|
'200':
|
|
description: Thumbnail successfully added
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
url:
|
|
type: string
|
|
path:
|
|
type: string
|
|
name:
|
|
type: string
|
|
delete:
|
|
tags:
|
|
- topics
|
|
summary: remove topic thumbnail
|
|
description: This operation removes a topic thumbnail.
|
|
parameters:
|
|
- in: path
|
|
name: tid
|
|
schema:
|
|
type: string
|
|
required: true
|
|
description: a valid topic id
|
|
example: 1
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
path:
|
|
type: string
|
|
description: Relative path to the topic thumbnail
|
|
example: files/test.png
|
|
responses:
|
|
'200':
|
|
description: Topic thumbnail removed
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
status:
|
|
$ref: ../../../components/schemas/Status.yaml#/Status
|
|
response:
|
|
type: array
|
|
description: A list of the topic thumbnails that still remain
|
|
items:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
path:
|
|
type: string
|
|
url:
|
|
type: string
|
|
description: Path to a topic thumbnail |