Skip to content

Instantly share code, notes, and snippets.

@arilotter
Last active September 13, 2021 16:17
Show Gist options
  • Select an option

  • Save arilotter/a0e066fbe628fbe2ac1003a28c88e2cd to your computer and use it in GitHub Desktop.

Select an option

Save arilotter/a0e066fbe628fbe2ac1003a28c88e2cd to your computer and use it in GitHub Desktop.
const cardsEndpoint = 'https://api.skyweaver.net/rpc/SkyWeaverAPI/GetCardLibrary';
async function getCards() {
const cardResults = await fetch(cardsEndpoint, {
method: 'post',
body: JSON.stringify({
page: {
page: 1,
pageSize: 1000
}
}),
headers: { 'Content-Type': 'application/json' }
});
const cardBodies = await cardResults.json();
return cardBodies
}
async function main() {
console.log(await getCards());
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment