diff --git a/app/imports/api/creature/v1Migration/migrateCharacter.js b/app/imports/api/creature/v1Migration/migrateCharacter.js new file mode 100644 index 00000000..6321c17f --- /dev/null +++ b/app/imports/api/creature/v1Migration/migrateCharacter.js @@ -0,0 +1,12 @@ +import { fetch } from 'meteor/fetch' + +export default function importCharacter(url){ + // Using v1's JSON API to fetch the character data in a nice format + // url -> https://dicecloud.com/character/HxerC2ZYXKrNc8u2M/json?key= + fetch(url) + .then(response => response.json()) + .then(data => { + let character = data.characters[0]; + console.log(character.name + ' fetched successfuly') + }); +}