Skip to content

craftaro/ServerJars-JavaScriptAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ServerJars

ServerJars-API

The Node JavaScript API for ServerJars

NPM

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);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published