Google Apps Script client wrapper for the SWGoH.help API.
For API access and support, please visit us on Discord.
Within your Google document:
- open the menu
Resources
and select the optionLibraries...
- add the library by using this script ID
1bMXMdwJmhTBxb4tBMEyEtw3jPVTzMZQz6NZ9Wm5-5b2MPWWFfqJVGa6n
and selecting the latest version - use the following snippet for simple testing:
function Test() {
// Fill in with your swgoh.help API credentials
var settings = {
username: "???",
password: "???"
};
var client = new swgohhelpapi.module.exports.Client(settings);
var allycodes = [213176142];
var json = client.fetchPlayer({
allycodes: allycodes,
project: {
allyCode: true,
name: true,
updated: true
}
});
debugger;
}
Consider donating to its Patreon.
Help us continue to scale and support more players across a wider range of tools! Every dollar helps us to boost resources and increase stability. Your donation will help ensure a continued data stream for your favourite swgoh tools.
Prerequisite:
- Have Google Clasp CLI installed
- (Recommended) setup your TypeScript IDE
npm install -g @google/clasp typescript
Steps:
- Make a local copy of the GitHub repository.
- run the command
yarn install
- Edit the file
.clasp.json
with the scriptId of your own copy of the Territory Battles spreadsheet - If needed, edit the source
.ts
files under thesrc/
directory - Use Clasp CLI to push the transpiled TypeScript into your Google script
- (Optional) issue a Pull Request for your changes to be added to the official release
Reach him on Discord
Contributions and feature requests are welcome.
MIT License (c) Guillaume Contesso a.k.a. PopGoesTheWza