custom_emojis API 方法
每个站点都可以定义和上传自己的自定义表情,以便附加到个人资料或嘟文。
查看所有自定义表情
GET /api/v1/custom_emojis HTTP/1.1
返回实例上可用的自定义表情。
返回: CustomEmoji数组
OAuth: 公开
版本历史:
2.0.0 - 添加
3.0.0 - 响应中添加了可选的 category
响应
200: OK
来自 mastodon.social 的示例响应
[
{
"shortcode": "aaaa",
"url": "https://files.mastodon.social/custom_emojis/images/000/007/118/original/aaaa.png",
"static_url": "https://files.mastodon.social/custom_emojis/images/000/007/118/static/aaaa.png",
"visible_in_picker": true
},
{
"shortcode": "AAAAAA",
"url": "https://files.mastodon.social/custom_emojis/images/000/071/387/original/AAAAAA.png",
"static_url": "https://files.mastodon.social/custom_emojis/images/000/071/387/static/AAAAAA.png",
"visible_in_picker": true
},
// [...]
{
"shortcode": "blobaww",
"url": "https://files.mastodon.social/custom_emojis/images/000/011/739/original/blobaww.png",
"static_url": "https://files.mastodon.social/custom_emojis/images/000/011/739/static/blobaww.png",
"visible_in_picker": true,
"category": "Blobs"
},
// [...]
{
"shortcode": "yikes",
"url": "https://files.mastodon.social/custom_emojis/images/000/031/275/original/yikes.png",
"static_url": "https://files.mastodon.social/custom_emojis/images/000/031/275/static/yikes.png",
"visible_in_picker": true
},
{
"shortcode": "ziltoid",
"url": "https://files.mastodon.social/custom_emojis/images/000/017/094/original/05252745eb087806.png",
"static_url": "https://files.mastodon.social/custom_emojis/images/000/017/094/static/05252745eb087806.png",
"visible_in_picker": true
}
]
另请参考
app/controllers/api/v1/custom_emojis_controller.rb翻译状态: 本文是英文页面 custom_emojis API methods 的翻译,最后翻译时间:2025-04-21,点击这里可以查看翻译后页面的改动。