Typescript/Javascript Spiget API client
npm install spiget
const {Spiget} = require("spiget");
const spiget = new Spiget("MyExampleSpigetApp");
spiget.getAuthor(6643).then(author => {
console.log(author);
author.getResources().then(resources => {
console.log(resources);
});
});
const {Spiget} = require("spiget");
const spiget = new Spiget("MyExampleSpigetApp");
async function start() {
const author = await spiget.getAuthor(6643);
console.log(author);
const resources = await author.getResources();
console.log(resources);
}
start();