A RESTful API for D&D 5e spells
The API consists of two routes, spells, and schools. If you query for an entity that doesn't exist you will receive 404.
Returns a list of Spell objects. eg.
GET /spells/
[
{
"id": "acid-splash",
"name": "Acid Splash",
"description": "You hurl a bubble of acid. Choose one creature within range, or choose two creatures within range that are within 5 feet of each other. A target must succeed on a Dexterity saving throw or take 1d6 acid damage.\nThis spell’s damage increases by 1d6 when you reach 5th level (2d6), 11th level (3d6), and 17th level (4d6).",
"level": 0,
"duration": "Instantaneous",
"range": "60 feet",
"components": "V, S",
"school": "conjuration",
"casting_time": "1 action",
"classes": ["sorcerer", "wizard"]
},
{
"id": "aid",
"name": "Aid",
"description": "Your spell bolsters your allies with toughness and resolve. Choose up to three creatures within range. Each target’s hit point maximum and current hit points increase by 5 for the duration. At Higher Levels. When you cast this spell using a spell slot of 3rd level or higher, a target’s hit points increase by an additional 5 for each slot level above 2nd.",
"level": 2,
"duration": "8 hours",
"range": "30 feet",
"components": "V, S, M (a tiny strip of white cloth)",
"school": "abjuration",
"casting_time": "1 action",
"classes": ["cleric", "paladin"]
}
]Returns the Spell with the :spellId provided, or HTTP 404 if there was no Spell.
eg.
GET /spells/acid-splash
{
"id": "acid-splash",
"name": "Acid Splash",
"description": "You hurl a bubble of acid. Choose one creature within range, or choose two creatures within range that are within 5 feet of each other. A target must succeed on a Dexterity saving throw or take 1d6 acid damage.\nThis spell’s damage increases by 1d6 when you reach 5th level (2d6), 11th level (3d6), and 17th level (4d6).",
"level": 0,
"duration": "Instantaneous",
"range": "60 feet",
"components": "V, S",
"school": "conjuration",
"casting_time": "1 action",
"classes": ["sorcerer", "wizard"]
}Returns a list of schools. eg.
GET /schools/
[
{
"id":"conjuration",
"name":"conjuration"
},
{
"id":"abjuration",
"name":"abjuration"
}
]Returns the School with the id provided. eg.
GET /schools/abjuration/
{
"id":"abjuration",
"name":"abjuration"
}Returns the list of Spells in the School with the schoolId provided. eg.
GET /schools/abjuration/spells
[
{
"id": "aid",
"name": "Aid",
"description": "Your spell bolsters your allies with toughness and resolve. Choose up to three creatures within range. Each target’s hit point maximum and current hit points increase by 5 for the duration. At Higher Levels. When you cast this spell using a spell slot of 3rd level or higher, a target’s hit points increase by an additional 5 for each slot level above 2nd.",
"level": 2,
"duration": "8 hours",
"range": "30 feet",
"components": "V, S, M (a tiny strip of white cloth)",
"school": "abjuration",
"casting_time": "1 action",
"classes": ["cleric", "paladin"]
}
]Blur requires Node.js.
Clone the project then run npm install in the root directory.
To run locally use npm start.
Please use Github Issues for feature requests or bug reports.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.