Skip to content
Connection wrapper for api.swgoh.help
Branch: master
Clone or download
shittybill
Latest commit df1d704 Jul 26, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Updated readme Jul 14, 2018
.project Connection wrapper for api.swgoh.help Jul 6, 2018
LICENSE
README.md
SwgohHelp.js
example.js Connection wrapper for api.swgoh.help Jul 6, 2018
package-lock.json updated version in package.json Jul 26, 2018
package.json updated version in package.json Jul 26, 2018

README.md

api-swgoh-help

JavaScript client wrapper for the API at https://api.swgoh.help

Usage

Install via npm:

npm install api-swgoh-help

Require and initialize connection:

const ApiSwgohHelp = require('api-swgoh-help');
const swapi = new ApiSwgohHelp({
	"username":"YOUR_USERNAME",
	"password":"YOUR_PASSWORD",
	"client_id":"YOUR_ID",
	"client_secret":"YOUR_SECRET"
});

Request player profile by allycode:

let allycode = 123456789;
const player = await swapi.fetchPlayer( allycode );
console.log( player );

Request guild roster by allycode:

let allycode = 123456789;
const guild = await swapi.fetchGuild( allycode );
console.log( guild );

Request available support data:

let criteria = 'stats';
const data = await swapi.fetchData( criteria );
console.log( data );

criteria = 'events';
data = await swapi.fetchData( criteria );
console.log( data );

Data criteria

  • events
  • units
  • arena
  • gear
  • mod-sets
  • mod-stats
  • skills
  • skill-types
  • tb
  • zetas
  • zeta-abilities
  • zeta-recommendations
  • battles

Available Language Clients

You can’t perform that action at this time.