-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(2014): Versioned docs into 2014 to prepare for 2024 (#105)
* feat(2014): Versioned docs into 2014 to prepare for 2024 * Whoops
- Loading branch information
Showing
22 changed files
with
2,855 additions
and
1,025 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# FAQ | ||
|
||
### A monster, spell, subclass, etc. is missing from the API / Database. Can I add it? | ||
|
||
Please check if the data is within [the SRD.](https://media.wizards.com/2016/downloads/DND/SRD-OGL_V5.1.pdf) If it is, feel free to open an issue or PR to add it yourself. Otherwise, due to legal reasons, we cannot add it. | ||
|
||
[This reddit post is a good explanation of how this works.](https://www.reddit.com/r/DnD/comments/hqw3jx/til_that_the_spell_tashas_hideous_laughter_was/fy0q5ej/) | ||
|
||
### What is the SRD? | ||
|
||
The SRD, or Systems Reference Document, contains guidelines for publishing content under the OGL. This allows for some of the data for D&D 5e to be open source. The API only covers data that can be found in the SRD. [Here's a link to the full text of the SRD.](https://media.wizards.com/2016/downloads/DND/SRD-OGL_V5.1.pdf) | ||
|
||
### What is the OGL? | ||
|
||
The Open Game License (OGL) is a public copyright license by Wizards of the Coast that may be used by tabletop role-playing game developers to grant permission to modify, copy, and redistribute some of the content designed for their games, notably game mechanics. However, they must share-alike copies and derivative works. [More information about the OGL can be found here.](https://en.wikipedia.org/wiki/Open_Game_License) | ||
|
||
### Can I support this project? Where can I contribute to this project? | ||
|
||
Yes! Please! This is a evolving API and having fresh ideas are always welcome! You can open an issue in either repo, open a PR for changes, or just discuss with other users in this discord. | ||
|
||
Additionally, there is a separate Docker image for each repo so you only have to run as much as you need. | ||
|
||
[The repo for the data lives here.](https://github.com/bagelbits/5e-database) | ||
[The repo for the API lives here.](https://github.com/bagelbits/5e-srd-api) | ||
|
||
### Can this API be self hosted? | ||
|
||
Yes it can! You can also host the data yourself if you don't want to use the API at all. You can also make changes and add extra data if you like. However, it is up to you to merge in new changes to the data and API. | ||
|
||
### Can I publish is on `insert platform`? Is this free use? | ||
|
||
Yes, you can. The API itself is under the [MIT license](https://opensource.org/licenses/MIT), and the underlying data accessible via the API is supported under the SRD and OGL. | ||
|
||
### Is there a limit to the number of calls I can make at a time? | ||
|
||
Yes. Currently there is a limiter in place for 10k requests per second per IP. This is subject to change if something more practical needs to be enforced. | ||
|
||
### Am I allowed to/Is it legal to put more than just SRD content in my own version of this API? Is it legal for me to do `insert questionable idea`? | ||
|
||
¯\\\_(ツ)\_/¯ I am not a lawyer, so do this at your own risk. However, one of our users made a wonderful flow chart that can help point you in the right direction. I must stress the point that this is not legal advice though. | ||
|
||
![Copyrights Flowchart](/img/faq/copyrightsFlowchart.png) | ||
|
||
### How can I help fund this project? | ||
|
||
To be completely transparent, this project only costs me $7/mo to run. However, if you want to [help fund it anyways](https://ko-fi.com/bagelbits). | ||
|
||
You can also find links on both repos. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# GraphQL | ||
|
||
This API supports [GraphQL](https://graphql.org/). The GraphQL URL for this API | ||
is `https://www.dnd5eapi.co/graphql`. Most of your questions regarding the GraphQL schema can be answered by querying the endpoint with the Apollo sandbox explorer. | ||
|
||
|
||
## Example Queries | ||
|
||
Here is a list of example queries you can run in the sandbox explorer to get started trying out the GraphQL functionality of the API. | ||
|
||
### Get a list of ability scores | ||
|
||
```graphql | ||
query { | ||
abilityScores { | ||
name | ||
desc | ||
skills { | ||
name | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Introduction | ||
|
||
### :arrow_right: [Skip to the tutorials](/docs/tutorials/) | ||
|
||
*If you wanna skip right into the tutorial, go ahead. We don't mind!* | ||
|
||
### :wave: Welcome | ||
|
||
Welcome to the D&D 5e SRD API, the Dungeons & Dragons 5th Edition API! | ||
|
||
This documentation should help you familiarize yourself with the resources available and how to consume them with HTTP requests. Read through the [Tutorial](/docs/tutorials/) getting started section before you dive in. | ||
|
||
Most of your problems should be solved just by reading through it. | ||
|
||
### :lock: Authentication | ||
|
||
This is a completely open API. **No authentication is required to query and get data**. This also means that we've limited what you can do to just `GET`-ing the data. | ||
|
||
If you find a mistake in the data, feel free to [message us](https://discord.gg/TQuYTv7)! | ||
|
||
### :smile: Chat | ||
|
||
Come hang out with us [on Discord](https://discord.gg/TQuYTv7)! We're friendly and would love to hear what you make with the API! | ||
|
||
### :handshake: Contribute | ||
|
||
This API is built from two repositories: | ||
|
||
- The repo containing the data lives here: https://github.com/5e-bits/5e-database | ||
- The repo with the API implementation lives here: https://github.com/5e-bits/5e-srd-api | ||
|
||
This is a evolving API and having fresh ideas are always welcome! You can | ||
open an issue in either repo, open a PR for changes, or just discuss with | ||
other users in this Discord. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Reference", | ||
"position": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# Schemas | ||
|
||
Definitions of all schemas will be accessible in a future update. Two of the most common schemas are described here. | ||
|
||
## API Reference | ||
|
||
Represents a minimal representation of a resource. The detailed representation of the referenced resource can be retrieved by making a request to the referenced `URL`. | ||
|
||
``` | ||
APIReference { | ||
index string | ||
name string | ||
url string | ||
} | ||
``` | ||
|
||
|
||
## Difficulty Check (DC) | ||
|
||
Represents a difficulty check. | ||
|
||
``` | ||
DC { | ||
dc_type APIReference | ||
dc_value number | ||
success_type "none" | "half" | "other" | ||
} | ||
``` | ||
|
||
## Damage | ||
|
||
Represents damage. | ||
|
||
``` | ||
Damage { | ||
damage_type APIReference | ||
damage_dice string | ||
} | ||
``` | ||
|
||
## Choice | ||
|
||
Represents a choice made by a player. Commonly seen related to decisions made during character creation or combat (e.g.: the description of the cleric class, under **Proficiencies**, states "Skills: Choose two from History, Insight, Medicine, Persuasion, and Religion" [[SRD p15]](https://media.wizards.com/2016/downloads/DND/SRD-OGL_V5.1.pdf#page=15)) | ||
|
||
``` | ||
Choice { | ||
desc string | ||
choose number | ||
type string | ||
from OptionSet | ||
} | ||
``` | ||
|
||
|
||
## OptionSet | ||
|
||
The OptionSet structure provides the options to be chosen from, or sufficient data to fetch and interpret the options. All OptionSets have an `option_set_type` attribute that indicates the structure of the object that contains the options. The possible values are `options_array`, `equipment_category`, and `reference_list`. Other attributes on the OptionSet depend on the value of this attribute. | ||
|
||
- `options_array` | ||
- `options` (array): An array of Option objects. Each item in the array represents an option that can be chosen. | ||
- `equipment_category` | ||
- `equipment_category` (APIReference): A reference to an EquipmentCategory. Each item in the EquipmentCategory's `equipment` array represents one option that can be chosen. | ||
- `resource_list` | ||
- `resource_list_url` (string): A reference (by URL) to a collection in the database. The URL may include query parameters. Each item in the resulting ResourceList's `results` array represents one option that can be chosen. | ||
|
||
## Option | ||
|
||
When the options are given in an `options_array`, each item in the array inherits from the Option structure. All Options have an `option_type` attribute that indicates the structure of the option. The value of this attribute indicates how the option should be handled, and each type has different attributes. The possible values and their corresponding attributes are listed below. | ||
|
||
- `reference` - A terminal option. Contains a reference to a Document that can be added to the list of options chosen. | ||
- `item` (APIReference): A reference to the chosen item. | ||
- `action` - A terminal option. Contains information describing an action, for use within Multiattack actions. | ||
- `action_name` (string): The name of the action, according to its `name` attribute. | ||
- `count` (number | string): The number of times this action can be repeated if this option is chosen. | ||
- `type` (string = `"melee" | "ranged" | "ability" | "magic"`, optional): For attack actions that can be either melee, ranged, abilities, or magic. | ||
- `multiple` - When this option is chosen, all of its child options are chosen, and must be resolved the same way as a normal option. | ||
- `items` (array): An array of Option objects. All of them must be taken if the option is chosen. | ||
- `choice` - A nested choice. If this option is chosen, the Choice structure contained within must be resolved like a normal Choice structure, and the results are the chosen options. | ||
- `choice` (Choice): The Choice to resolve. | ||
- `string` - A terminal option. Contains a reference to a string. | ||
- `string` (string): The string. | ||
- `ideal` - A terminal option. Contains information about an ideal. | ||
- `desc` (string): A description of the ideal. | ||
- `alignments` (ApiReference[]): A list of alignments of those who might follow the ideal. | ||
- `counted_reference` - A terminal option. Contains a reference to something else in the API along with a count. | ||
- `count` (number): Count. | ||
- `of` (ApiReference): Thing being referenced. | ||
- `score_prerequisite` - A terminal option. Contains a reference to an ability score and a minimum score. | ||
- `ability_score` (ApiReference): Ability score being referenced. | ||
- `minimum_score` (number): The minimum score required to satisfy the prerequisite. | ||
- `ability_bonus` - A terminal option. Contains a reference to an ability score and a bonus | ||
- `ability_score` (ApiReference): Ability score being referenced | ||
- `bonus` (number): The bonus being applied to the ability score | ||
- `breath` - A terminal option: Contains a reference to information about a breath attack. | ||
- `name` (string): Name of the breath. | ||
- `dc` (DC): Difficulty check of the breath attack. | ||
- `damage` ([Damage]): Damage dealt by the breath attack, if any. | ||
- `damage` - A terminal option. Contains information about damage. | ||
- `damage_type` (ApiReference): Reference to type of damage. | ||
- `damage_dice` (string): Damage expressed in dice (e.g. "13d6"). | ||
- `notes` (string): Information regarding the damage. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Status Page | ||
|
||
The status page for the API can be found [here](https://5e-bits.github.io/dnd-uptime/). | ||
|
||
![Status Page](/img/status-page.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Tutorials", | ||
"position": 3 | ||
} |
4 changes: 4 additions & 0 deletions
4
versioned_docs/version-2014/tutorials/advanced/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Advanced", | ||
"position": 3 | ||
} |
Oops, something went wrong.