1.0.2 • Published 5 years ago
hyperscape.js v1.0.2
HyperScape.js
Simple Node.js wrapper for the unofficial Tabstats.com HyperScape API.
Setup and Installation
npm i hyperscape.js
Search for Player
const HyperScape = require("hyperscape.js");
const api = new HyperScape();
api.search("rex9135", "uplay").then(result => { // api.search will return multiple results if there are no exact matches.
var id;
for(var key in result) {
id = key; // Will return the last player ID in results
}
console.log(result[id].profile);
});
Get Player Stats By Username
const HyperScape = require("./index");
const api = new HyperScape();
api.stats("nuuqez", "uplay", "username").then(result => {
console.log(result);
});
Search Partial Name
api.search("r", "uplay").then(result => {
console.log(result);
})