main
mikebase
A Rust-based emote database and API.
Importing legacy emotes
Use the protected management endpoint to mirror emotes from a legacy JSON feed.
Endpoint
POST /manage/import
- Auth: HTTP Basic (same credentials used for other protected routes)
- Content-Type: application/json
- Body:
{
"source_url": "https://smutba.se/emoji/json/"
}
Behavior
- Fetches source JSON in the format
{"emotes": [{name, url, created, modified}, ...]} - Downloads each image URL and uploads bytes to this app's configured S3 bucket
- Inserts emote rows preserving source
createdandmodifiedtimestamps - Skips entries where
namealready exists locally - Continues processing after per-item failures and returns a batch summary
Example response
{
"source_url": "https://smutba.se/emoji/json/",
"total": 2,
"imported": 1,
"skipped": 1,
"failed": 0,
"results": [
{"name": "legacy_new", "status": "imported", "reason": null},
{"name": "legacy_duplicate", "status": "skipped", "reason": "Name already exists"}
]
}
Allowlisted hosts
Import is restricted to hosts in configuration:
[import]
allowed_hosts = ["smutba.se"]
Environment override example:
APP__IMPORT__ALLOWED_HOSTS=["smutba.se","legacy.example.org"]