- security: [%{"oAuth" => ["write"]}],
- parameters: [url_param()],
+ security: [%{"oAuth" => ["admin:write"]}],
+ parameters: [
+ url_param(),
+ Operation.parameter(
+ :page,
+ :query,
+ %Schema{type: :integer, default: 1},
+ "Page"
+ ),
+ Operation.parameter(
+ :page_size,
+ :query,
+ %Schema{type: :integer, default: 30},
+ "Number of emoji to return"
+ )
+ ],
operationId: "PleromaAPI.EmojiPackController.remote",
responses: %{
200 => emoji_packs_response(),
operationId: "PleromaAPI.EmojiPackController.remote",
responses: %{
200 => emoji_packs_response(),
summary: "Lists local custom emoji packs",
operationId: "PleromaAPI.EmojiPackController.index",
parameters: [
summary: "Lists local custom emoji packs",
operationId: "PleromaAPI.EmojiPackController.index",
parameters: [
summary: "Show emoji pack",
operationId: "PleromaAPI.EmojiPackController.show",
parameters: [
summary: "Show emoji pack",
operationId: "PleromaAPI.EmojiPackController.show",
parameters: [
summary: "Requests a local pack archive from the instance",
operationId: "PleromaAPI.EmojiPackController.archive",
parameters: [name_param()],
summary: "Requests a local pack archive from the instance",
operationId: "PleromaAPI.EmojiPackController.archive",
parameters: [name_param()],
summary: "Download pack from another instance",
operationId: "PleromaAPI.EmojiPackController.download",
summary: "Download pack from another instance",
operationId: "PleromaAPI.EmojiPackController.download",
requestBody: request_body("Parameters", download_request(), required: true),
responses: %{
200 => ok_response(),
requestBody: request_body("Parameters", download_request(), required: true),
responses: %{
200 => ok_response(),
summary: "Create an empty pack",
operationId: "PleromaAPI.EmojiPackController.create",
summary: "Create an empty pack",
operationId: "PleromaAPI.EmojiPackController.create",
summary: "Delete a custom emoji pack",
operationId: "PleromaAPI.EmojiPackController.delete",
summary: "Delete a custom emoji pack",
operationId: "PleromaAPI.EmojiPackController.delete",
parameters: [name_param()],
responses: %{
200 => ok_response(),
400 => Operation.response("Bad Request", "application/json", ApiError),
parameters: [name_param()],
responses: %{
200 => ok_response(),
400 => Operation.response("Bad Request", "application/json", ApiError),
- 404 => Operation.response("Not Found", "application/json", ApiError)
+ 404 => Operation.response("Not Found", "application/json", ApiError),
+ 500 => Operation.response("Error", "application/json", ApiError)
summary: "Updates (replaces) pack metadata",
operationId: "PleromaAPI.EmojiPackController.update",
summary: "Updates (replaces) pack metadata",
operationId: "PleromaAPI.EmojiPackController.update",
requestBody: request_body("Parameters", update_request(), required: true),
parameters: [name_param()],
responses: %{
200 => Operation.response("Metadata", "application/json", metadata()),
requestBody: request_body("Parameters", update_request(), required: true),
parameters: [name_param()],
responses: %{
200 => Operation.response("Metadata", "application/json", metadata()),
- 400 => Operation.response("Bad Request", "application/json", ApiError)
+ 400 => Operation.response("Bad Request", "application/json", ApiError),
+ 500 => Operation.response("Error", "application/json", ApiError)
summary: "Imports packs from filesystem",
operationId: "PleromaAPI.EmojiPackController.import",
summary: "Imports packs from filesystem",
operationId: "PleromaAPI.EmojiPackController.import",