1.0.1 • Published 4 years ago

serverjars-api v1.0.1

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

ServerJars

ServerJars-API

The Node JavaScript API for ServerJars

Code Examples:

Fetching the latest Jar:

const ServerJars = require('serverjars-api');

ServerJars.fetchLatest('spigot').then(jar => {
    console.log(jar.version);
}).catch(console.log);

Fetching the all Jars:

const ServerJars = require('serverjars-api');

ServerJars.fetchAll('spigot').then(jars => {
    console.log(jars)
}).catch(console.log);

Downloading Jars:

const ServerJars = require('serverjars-api');

ServerJars.downloadJar('spigot', '1.14.4', './spigot-1.14.4.jar').then(stream => {
    stream.on('finish', () => {
        console.log('Downloaded')
    })
}).catch(console.log);