spiget
v0.1.3
Published
Javascript/Typescript client for the spiget.org API
Downloads
2
Readme
spiget-typescript
Typescript/Javascript Spiget API client
npm install spiget
Quick Start
const {Spiget} = require("spiget");
const spiget = new Spiget("MyExampleSpigetApp");
spiget.getAuthor(6643).then(author => {
console.log(author);
author.getResources().then(resources => {
console.log(resources);
});
});
Async / Await
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();