FiveRingsDB
An API to access cards and decks data from https://api.fiveringsdb.com
Cards ¶
Resources related to cards.
Card Collection ¶
List All CardsGET/cards
Anonymous access.
Whenever possible, use this action and put the data into cache if you need card data. Send the If-Modified-Since request header, and use the Cache-Control and Last-Modified response headers.
Example URI
200
Headers
Content-Type: application/json
Card ¶
View a Card DetailGET/cards/{code}
Anonymous access.
Get the data of one card. Don’t use this action unless you really can’t use the previous action.
Example URI
- code
string
(required)ID of the Card in the form of a string slug (“a-card-code”)
200
Headers
Content-Type: application/json
Card Rulings ¶
Resources related to cards rulings. Write access is protected by the ROLE_RULINGS permission.
Card Rulings ¶
View all RulingsGET/rulings
Anonymous access.
Text is Markdown.
Example URI
200
Headers
Content-Type: application/json
Card Ruling Collection ¶
Create a RulingPOST/cards/{card_id}/rulings
Requires ROLE_RULINGS.
Text may be Markdown, but is not parsed.
Example URI
- card_id
string
(required)ID of the Card in the form of a string slug (“example-card-code”)
200
Headers
Content-Type: application/json
List Rulings By CardGET/cards/{card_id}/rulings
Anonymous access.
Text may be raw Markdown.
Example URI
- card_id
string
(required)ID of the Card in the form of a string slug (“example-card-code”)
200
Headers
Content-Type: application/json
Card Ruling ¶
Edit a RulingPATCH/cards/{card_id}/rulings/{id}
Requires ROLE_GURU, and user must be the ruling’s creator.
Text may be Markdown, but is not parsed.
Example URI
- card_id
string
(required)ID of the Card in the form of a string slug (“example-card-code”)
- id
integer
(required)ID of the Ruling in the form of an integer
200
Headers
Content-Type: application/json
View a Ruling DetailGET/cards/{card_id}/rulings/{id}
Anonymous access.
Text is Markdown.
Example URI
- card_id
string
(required)ID of the Card in the form of a string slug (“example-card-code”)
- id
integer
(required)ID of the Ruling in the form of an integer
200
Headers
Content-Type: application/json
Card Reviews ¶
Resources related to cards reviews. Write access is protected by the ROLE_REVIEWS permission.
Card Review Collection ¶
Create a ReviewPOST/cards/{card_id}/reviews
Requires ROLE_REVIEWS.
Text may be Markdown, but is not parsed.
Example URI
- card_id
string
(required)ID of the Card in the form of a string slug (“example-card-code”)
200
Headers
Content-Type: application/json
List Reviews By CardGET/cards/{card_id}/reviews
Anonymous access.
Text may be raw Markdown.
Example URI
- card_id
string
(required)ID of the Card in the form of a string slug (“example-card-code”)
200
Headers
Content-Type: application/json
Card Review ¶
Edit a ReviewPATCH/cards/{card_id}/reviews/{id}
Requires ROLE_REVIEWS, and user must be the review’s creator.
Text may be Markdown, but is not parsed.
Example URI
- card_id
string
(required)ID of the Card in the form of a string slug (“example-card-code”)
- id
integer
(required)ID of the Review in the form of an integer
200
Headers
Content-Type: application/json
View a Review DetailGET/cards/{card_id}/reviews/{id}
Anonymous access.
Text may be raw Markdown.
Example URI
- card_id
string
(required)ID of the Card in the form of a string slug (“example-card-code”)
- id
integer
(required)ID of the Review in the form of an integer
200
Headers
Content-Type: application/json
Deck Validation ¶
Deck Validation ¶
- Attributes DeckContent
- card-id (string)
- copies (integer)
- card-id (string)
Validate a deckPOST/deck-validation/{format}
The request must be a JSON representation of a deck cards. Open the Request section below to see an example.
The response is a JSON object. The value of the status
key is the result of the validation.
The following table describes the possible values of status
:
status | description |
---|---|
0 | Deck is valid |
1 | Deck has too many copies of one or more cards |
2 | Deck has too few Strongholds |
3 | Deck has too many Strongholds |
4 | Deck has too many Roles |
5 | Deck has too few Dynasty cards |
6 | Deck has too many Dynasty cards |
7 | Deck has off-clan Dynasty cards |
8 | Deck has too few Conflict cards |
9 | Deck has too many Conflict cards |
10 | Deck does not have enough influence for its off-clan Conflict cards |
11 | Deck has more than one off-clan in its Conflict deck |
12 | Deck has too many Character cards in its Conflict deck |
13 | Deck has too few Provinces |
14 | Deck has too many Provinces |
15 | Deck has too many Provinces of one Element |
16 | Deck has an off-clan Province |
17 | Deck has an off-clan Conflict card with no influence cost |
Example URI
- format
string
(required)Format of the deck to validate (possible values:
standard
,single-core
)
Body
{
"shizuka-toshi": 1,
"ancestral-lands": 1,
"elemental-fury": 1,
"the-art-of-peace": 1,
"night-raid": 1,
"pilgrimage": 1
}
200
Headers
Content-Type: application/json
Deck Strains ¶
A Deck Strain is a series of Decks that are different versions of the same deck.
To create a Deck, one must first create a Deck Strain. Then a Deck can be added to the Strain.
The first Deck of a Strain is version 0.1. The second is version 0.2, etc.
The last Deck in a Strain is called the Head of the Strain.
Strain Collection ¶
-
Attribute Deck
- id (string)
- name (string)
- description (string)
- format (string)
- cards: (DeckContent)
- created_at: (datetime)
- user_id: (string)
- nb_likes: (integer)
- version: (string)
- problem: (integer)
- strain: (string)
-
Attribute Strain
- id (string)
- head (Deck)
Create a StrainPOST/strains
If the User has not reached her quota, a Strain is created and returned.
If origin
was passed in the JSON body and a Deck can be found with this ID and that Deck can be read by the User,
then a Deck is created in the Strain as a copy of that Deck.
Example URI
Body
{
"origin": "Hello, world!"
}
Schema
{
"type": "object",
"properties": {
"origin": {
"type": "string",
"description": "Optional ID of the Deck which will be copied to create the first Deck in the Strain"
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
200
Headers
Content-Type: application/json
List all StrainsGET/strains
Example URI
200
Headers
Content-Type: application/json
Strain ¶
Delete a StrainDELETE/strains/{id}
Delete a Strain and all its Decks.
Example URI
- id
uuid
(required)ID of the Strain
200
Headers
Content-Type: application/json
Get a StrainGET/strains/{id}
Get a Strain and its head (public).
Example URI
- id
uuid
(required)ID of the Strain
200
Headers
Content-Type: application/json
Strain Deck ¶
Strain Deck Collection ¶
List all Decks of a StrainGET/strains/decks
Example URI
200
Headers
Content-Type: application/json
Create a Strain DeckPOST/strains/decks
Excepts a Deck as request body.
Example URI
200
Headers
Content-Type: application/json
Strain Deck ¶
Get details about a DeckGET/strains/decks/
Example URI
200
Headers
Content-Type: application/json
Delete a Strain DeckDELETE/strains/decks/
Example URI
200
Headers
Content-Type: application/json