Skip to main content

What's inside a response

When you make request to the /sets/ path, one of two options will get returned to you: a successful response, or an error

Successful responses

A successful response consists of a JSON array with each entry being a single set. Each set consists of 5 key-value pairs, here is a brief description of each.

keyData TypeDescription
Set_NumIntegerThe name of the card including the subtitle denoted by " - " e.g. "Elsa - Snow Queen"
Release_DateStringThe amount of ink it costs to cast e.g. 5
CardsIntegerThe type of the card including optional subtype denoted by " - " e.g. "Character", or "Action - Song"
NameStringThe ink color of the card. e.g. "Amber", or "Steel"
Set_IDStringWhether the card can be placed into your inkwell
Date_AddedDateTimeThe date that the card was added the database (In yyyy-MM-dd hh:mm)
Date_ModifiedTimestampThe timestamp that the card was last modified in the database (in yyyy-MM-dd hh:mm:ss.s)

Unsuccessful Responses

When you make a response that is invalid, you will recieve a JSON response with information about the error. It will have four fields:

JSON KeyDescription
codeA short name for the error that occurred. e.g. "invalid_column"
detailsA one sentence description of what issue was encountered. e.g. "Unknown column 'nmae' in 'where clause'"
objectWill say the word "error" to denote this response as an error
statusThe HTTP response code associated with the request. Usually 400

Here is an example:

{
"code": "invalid_url",
"details": "Invalid URL! The current URLs avaliable for /cards/ is /cards/all, /cards/fetch",
"object": "error",
"status": 404
}