Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const config = {
method: 'GET',
mode: 'cors'
}
fetch(
"http://api.xivdb.com/minion?columns=behavior,icon,id,name_en,minion_race",
config
)
.then(response => response.json())
.then(response => {
process(response);
})
.catch(e => console.error(e));
function process(response) {
let result = {};
response.forEach(a => {
result[a.id] = {
behavior: a.behavior,
icon: a.icon,
name: a.name_en,
race: a.minion_race
}
})
console.info(result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.