The API exports data from the game's internal databases in a nice, webdev friendly JSON format.
GET /api/v1/(object type)/(spec)?...
Query the API for the objects of object type
matching spec
.
skill_t
: Card skill info.card_t
: Card info.leader_skill_t
: Centre skill info.char_t
: Character info.A spec is a list of IDs separated by commas. IDs are not sequential, and are only valid for their object type. Typically, an ID is an integer.
Success:
{
"result": [
; an array containing each object in the order they
; were requested, or null if it doesn't exist
; for detailed object contents, read the wiki:
; https://github.com/summertriangle-dev/sparklebox/wiki
]
}
Error: (see Errors under Misc.)
card_t.skill
) are replaced with a {"ref": url}
object, where url is a valid API URL to retrieve the object that would normally be embedded.
{“ref”: “/api/v1/skill_t/123”}
GET /api/v1/list/(object type)?...
Return a list of brief descriptions for all objects available using the corresponding object API.
card_t
: Card info.char_t
: Character info.Success:
{
"result": [
; an array containing each object
; for detailed object contents, read the wiki:
; https://github.com/summertriangle-dev/sparklebox/wiki
]
}
Error: This endpoint currently does not have any error conditions.
POST /api/v1/read_tl
["string1", "string2", ..., "stringN"]
Query translations for the given strings. This is the same API used by tlinject.js on starlight.kirara.ca.
The value returned is a JSON dict mapping the original strings to their translated counterparts if available:
{"つぼみ": "Tsubomi"}
GET /api/v1/happening/now
GET /api/v1/happening/(timestamp)
Get time-sensitive information.
GET /api/v1/info
{
"api_major": 1,
"api_revision": 2,
"truth_version": "10017160"
}
Return a bit of information about this instance of ssdb as a JSON dictionary. The following keys are available:
All URLs returned in API responses should be interpreted as relative to the URL that the response came from.
From an API call to /api/v1/card_t/123
...
../../images/blah.png
, which you would expand to /api/v1/images/blah.png
/static/hoshimoriuta/card/123.png
https://static.com/card/123.png
Some objects will have image URLs embedded in them. As a general rule, you can hotlink any image returned in an API response. However, if you expect a lot of traffic, you may want to mirror the images to your own server.
Do not make any assumptions about the file hierarchy of hoshimoriuta.kirara.ca. I reserve the right to make any change to it at any time, which will probably break your hardcoded image URLs. (Links you find in API responses will remain valid for a reasonable amount of time, so you can still cache them.)
If there is an error processing the request, we will return the JSON object
{"error": "Some error message"}
and the appropriate HTTP status.
There is none currently. If it does exist in the future, we will return an HTTP 429 status with the error object.
You don't have to credit data that comes from the API because it reads from game truth anyway. But if you'd like to, credit the Starlight Database
.
File an issue here if you have any problems with using the API.