/swgoh

Unofficial node library for swgoh.gg

Primary LanguageTypeScriptMIT LicenseMIT

Build Status npm version Coverage Status dependencies Status devDependencies Status

changelog

Synopsis

Node library to get information of swgoh parsing swgoh.gg, you can get profile, characters, guild members, ships, units and mods.

Code Example

import

const swgoh = require("swgoh").swgoh
//or
import {swgoh} from 'swgoh';
const username= "pikax";
swgoh.profile(username).then(function (p) {
  console.log(p);

  return swgoh.guild(p.guildUrl);
}).then(console.log);
swgoh.collection(username).then(console.log);
swgoh.ship(username).then(console.log);


const guild = "/g/232/requiem/"; // or {id:232}
swgoh.units(guild).then(console.log);

swgoh.mods(username).then(console.log);



//cached characters & ships (no requests)
import {characters, ships} from 'swgoh';

Motivation

With TB just released, this library provides easy way to get data from swgoh.gg

Installation

yarn add swgoh
npm i swgoh

Changelog

All notable changes to this project will be documented in this file.

[Unreleased]

  • Cache for Characters & Ship stats
  • Added Jest Tests

[0.3.2] - 2017-12-02

[0.3.1] - 2017-09-28

  • Player mods collection

[0.2.1] - 2017-09-22

[0.1.3] - 2017-09-20

  • Fix "Profile Data undefined" when not showing AllyCode on Swgoh (#2)

[0.1.2] - 2017-09-20

  • Added support for ships

[0.1.1] - 2017-08-19

  • Fixed issue with stars when getting collection

[0.1.0] - 2017-08-19

  • First release, support collection (toons), player info and guild info.

License

MIT

Disclaimer

The developer of this application does not have any affiliation with the Capital Games, Disney, Lucasfilm Limited or swgoh.gg.