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.
key | Data Type | Description |
---|---|---|
Set_Num | Integer | The name of the card including the subtitle denoted by " - " e.g. "Elsa - Snow Queen" |
Release_Date | String | The amount of ink it costs to cast e.g. 5 |
Cards | Integer | The type of the card including optional subtype denoted by " - " e.g. "Character", or "Action - Song" |
Name | String | The ink color of the card. e.g. "Amber", or "Steel" |
Set_ID | String | Whether the card can be placed into your inkwell |
Date_Added | DateTime | The date that the card was added the database (In yyyy-MM-dd hh:mm) |
Date_Modified | Timestamp | The 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 Key | Description |
---|---|
code | A short name for the error that occurred. e.g. "invalid_column" |
details | A one sentence description of what issue was encountered. e.g. "Unknown column 'nmae' in 'where clause'" |
object | Will say the word "error" to denote this response as an error |
status | The 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
}