mirror of
https://github.com/Obsidian-TTRPG-Community/dnd5e-markdown.git
synced 2025-07-21 06:34:49 -04:00
Initial Commit of 5e Data
Signed-off-by: Sigrunixia <Scholarlysigrun@icloud.com>
This commit is contained in:
parent
50691a5f88
commit
704166a4af
1807 changed files with 73364 additions and 4 deletions
35
tools/xentis-dnd-beyond-character-sheets-json-puller.md
Normal file
35
tools/xentis-dnd-beyond-character-sheets-json-puller.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Xentis DND Beyond Character Sheets JSON Puller
|
||||
**Obisidian Plugins Required**: [**Dataview**](https://github.com/blacksmithgu/obsidian-dataview)
|
||||
**Website**: [**DND Beyond**](http://www.dndbeyond.com/)
|
||||
**Summary**: This script will pull the JSON of the specified Character Sheet from DND Beyond.
|
||||
**Thanks To**: [**Xentis**](https://github.com/scottTomaszewski) from TTRPG on Obsidian.md Discord
|
||||
|
||||
It is highly recommended you download this file into your vault. Github will not display whether we are using dataview or dataviewjs calls.
|
||||
|
||||
## Instructioms
|
||||
Replace your character ID from your character sheet URL into:
|
||||
> const character_id = "Your Character ID Here"
|
||||
|
||||
## Example Codeblock
|
||||
>```dataviewjs
|
||||
>const character_id = "64093957"
|
||||
>
|
||||
>const headers = {}
|
||||
>const url = "https://character-service.dndbeyond.com/character/v5/character/" + character_id
|
||||
>const character_sheet_json = await requestUrl({url: url, headers})
|
||||
>const data = character_sheet_json.json.data
|
||||
>dv.paragraph(data.username)
|
||||
>dv.paragraph(data.name)
|
||||
>```
|
||||
|
||||
## Rendered Example (Obsidian Render)
|
||||
```dataviewjs
|
||||
const character_id = "64093957"
|
||||
|
||||
const headers = {}
|
||||
const url = "https://character-service.dndbeyond.com/character/v5/character/" + character_id
|
||||
const character_sheet_json = await requestUrl({url: url, headers})
|
||||
const data = character_sheet_json.json.data
|
||||
dv.paragraph(data.username)
|
||||
dv.paragraph(data.name)
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue