summaryrefslogtreecommitdiff
path: root/docs/api
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-11-14 23:47:27 +0100
committerLibravatar GitHub <noreply@github.com>2022-11-14 22:47:27 +0000
commit4cd00d546c495b085487d11f2fe2c4928600dc10 (patch)
tree6605424baafddf020a4a6e0a0ddcde9293c1cb56 /docs/api
parent[chore] Remove unused `admin account suspend` action (#1047) (diff)
downloadgotosocial-4cd00d546c495b085487d11f2fe2c4928600dc10.tar.xz
[feature] Allow newly uploaded emojis to be placed in categories (#939)
* [feature] Add emoji categories GET Serialize emojis in appropriate categories; make it possible to get categories via the admin API * [feature] Create (or use existing) category for new emoji uploads * fix lint issue * update misleading line in swagger docs
Diffstat (limited to 'docs/api')
-rw-r--r--docs/api/swagger.yaml56
1 files changed, 56 insertions, 0 deletions
diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml
index 9eb10269b..528ea03c7 100644
--- a/docs/api/swagger.yaml
+++ b/docs/api/swagger.yaml
@@ -859,8 +859,27 @@ definitions:
type: object
x-go-name: Emoji
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
+ emojiCategory:
+ properties:
+ id:
+ description: The ID of the custom emoji category.
+ type: string
+ x-go-name: ID
+ name:
+ description: The name of the custom emoji category.
+ type: string
+ x-go-name: Name
+ title: EmojiCategory represents a custom emoji category.
+ type: object
+ x-go-name: EmojiCategory
+ x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
emojiCreateRequest:
properties:
+ CategoryName:
+ description: |-
+ Category in which to place the new emoji. Will be uncategorized by default.
+ CategoryName length should not exceed 64 characters.
+ type: string
Image:
description: Image file to use for the emoji. Must be png or gif and no larger than 50kb.
Shortcode:
@@ -2755,6 +2774,10 @@ paths:
name: image
required: true
type: file
+ - description: Category in which to place the new emoji. 64 characters or less. If left blank, emoji will be uncategorized. If a category with the given name doesn't exist yet, it will be created.
+ in: formData
+ name: category
+ type: string
produces:
- application/json
responses:
@@ -2852,6 +2875,39 @@ paths:
summary: Get the admin view of a single emoji.
tags:
- admin
+ /api/v1/admin/custom_emojis/categories:
+ get:
+ operationId: emojiCategoriesGet
+ parameters:
+ - description: The id of the emoji.
+ in: path
+ name: id
+ required: true
+ type: string
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: Array of existing emoji categories.
+ schema:
+ items:
+ $ref: '#/definitions/adminEmojiCategory'
+ type: array
+ "400":
+ description: bad request
+ "401":
+ description: unauthorized
+ "403":
+ description: forbidden
+ "404":
+ description: not found
+ "406":
+ description: not acceptable
+ "500":
+ description: internal server error
+ summary: Get a list of existing emoji categories.
+ tags:
+ - admin
/api/v1/admin/domain_blocks:
get:
operationId: domainBlocksGet