A simple Magic: The Gathering 60-card deck builder.
Navigate to the root directory of the repository and run the following command
mvn spring-boot:run
All requests must contain the following header(s)
"X-API-KEY": "SuperSecretToken"
localhost:8080
- Returns list of all cards
- Returns single card with matching name
- Returns single card with matching id
- Delete card with matching id
- Returns list of all land cards
- Action
- Creates new land card
- Request Body Fields
- name (required)
- String
- colors (required)
- Array of Colors
- Acceptable Color values: White, Blue, Black, Red, Green, Any, Colorless
- Array of Colors
- abilities
- Array of Strings
- name (required)
Example Request Body
{
name: "Azorius Chancery",
colors: ["White", "Blue"],
abilities: ["Azorious Chancery comes into play tapped.", "When Azorius Chancery comes into play, return a land you control to its owner's hand.", "Tap to add 1 white and 1 blue mana to your mana pool."]
}
- Action
- Full update of land card with matching id, or creates new land card if no matching id found
- Request Body Fields
- Same as POST /cards/lands, but without field requirements
- Returns list of all spell cards
- Action
- Creates new spell card
- Request Body Fields
- name (required)
- String
- abilities (required)
- Array of Strings
- manaCost (required)
- Array of Colors
- Acceptable Color values: White, Blue, Black, Red, Green, Any, Colorless
- Array of Colors
- type (required)
- Card Type (String)
- Acceptable Card Type values: Instant, Sorcery, Artifact, Enchantment, Creature
- Card Type (String)
- name (required)
Example Request Body
{
name: "Counterspell",
abilities: ["Counter target spell."],
manaCost: ["Blue", "Blue"],
type: "Instant"
}
- Action
- Full update of spell card with matching id, or creates new spell card if no matching id found
- Request Body Fields
- Same as POST /cards/spells, but without field requirements
- Returns list of all spell cards
- Action
- Creates new creature card
- Request Body Fields
- name (required)
- String
- manaCost (required)
- Array of Colors
- Acceptable Color values: White, Blue, Black, Red, Green, Any, Colorless
- Array of Colors
- power (required)
- Integer
- toughness (required)
- Integer
- abilities
- Array of Strings
- attributes
- Array of Creature Attributes
- Acceptable Creature Attribute values: Deathtouch, Double_Strike, First_Strike, Flying, Haste, Lifelink, Menace, Reach, Trample, Vigilance
- Array of Creature Attributes
- name (required)
Example Request Body
{
name: "Atraxa, Praetor's Voice",
manaCost: ["White", "Blue", "Black", "Green"],
power: 4,
toughness: 4,
abilities: ["At the beginning of your end step, proliferate."],
attributes: ["Flying", "Vigilance", "Deathtouch", "Lifelink"]
}
- Action
- Full update of creature card with matching id, or creates new creature card if no matching id found
- Request Body Fields
- Same as POST /cards/creatures, but without field requirements
- Returns list of all decks
- Returns single deck with matching name
- Returns single deck with matching id
- Action
- Creates new deck
- Request Body Fields
- name (required)
- String
- colors (required)
- Array of Colors
- Acceptable Color values: White, Blue, Black, Red, Green, Any, Colorless
- Array of Colors
- cardList
- Array of Card ids
- Max length = 60
- Note: Other than basic lands, each deck is allowed up to 4 instances of a single card
- name (required)
Example Request Body
{
name: "Azorius Control",
colors: ["White", "Blue"],
cardList: [1,1,1,1,2,2]
}
- Action
- Partially updates deck with matching id
- Request Body fields
- name
- String
- cardList
- Array of Card ids
- Max length = 60
- Note: Other than basic lands, each deck is allowed up to 4 instances of a single card
- name
- Delete deck with matching id