KartoffelChipss / splatoon3api

Splatoon3api is a simple library to get the current and next Splatoon 3 Maps (rotations), Salmonruns and Splatnet gear

Home Page:https://www.npmjs.com/package/splatoon3api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Splatoon3api

Splatoon3api is a simple library to get the current and next Splatoon 3 Maps (rotations), Salmonruns, Challenges, Splatfests and Splatnet gear. This package uses the data from splatoon3.ink. Splatoon3api is available in 14 different languages (List of available languages)

npm npm discord

If you have trouble with this package, feel free to ask me in my Discord.

Table of contents

Installation

Simply execute the following command in your commandline:

npm install splatoon3api

Usage

Import the package like this:

import splatoon3api from "splatoon3api";
const Splatoon3 = new splatoon3api.Client("en-US");

or this:

const splatoon3api = require("splatoon3api");
const Splatoon3 = new splatoon3api.Client("en-US");

Languages

You can exchange en-US for any other language in the list below:

  • en-US - English (US)
  • en-GB - English (GB)
  • de-DE - Deutsch
  • nl-NL - Nederlands
  • fr-FR - Français (FR)
  • fr-CA - Français (CA)
  • es-ES - Español (ES)
  • es-MX - Español (MX)
  • it-IT - Italiano
  • ru-RU - Русский
  • ja-JP - 日本語
  • ko-KR - 한국어
  • zh-CN - 中文(简体)
  • zh-TW - 中文(台灣)

Options

You can change the options to tune splatoon3api to your liking:

const Splatoon3 = new splatoon3api.Client("en-GB");
Splatoon3.options.userAgent = "MyApp/1.0 (contact@example.com)";
Splatoon3.options.cache = {
   enabled: true,
   ttl: 60,
}

Once you have done this, you can use all the following functions as you like.

Stages

All Stages

To get 11 upcoming and the current stages for Turf War, Ranked, XBattle, and Splatfest, you can use the getStages() function:

Splatoon3.getStages(res => {
    console.log(res);
});

Current Stages

To get the current Turf War and Ranked maps, you can use the getCurrentStages() function:

Splatoon3.getCurrentStages(res => {
    console.log(res);
});

Next Stages

To get the next Turf War and Ranked maps, you can use the getNextStages() function:

Splatoon3.getNextStages(res => {
    console.log(res);
});

Other

Salmonrun Schedules

To get the current and next Salmonruns, you can use the getSalmonRun() function:

Splatoon3.getSalmonRun(res => {
    console.log(res);
});

Challenges

To get the current Challenges, you can use the getChallenges() function:

Splatoon3.getChallenges(res => {
    console.log(res);
});

Splatnet Gear

To get the currently available Splatnet gear, you can use the getSplatnetGear() function:

Splatoon3.getSplatnetGear(res => {
    console.log(res);
});

Splatfests

Splatfests are divided into those four regions:

  • US: The Americas, Australia, New Zealand
  • EU: Europe
  • JP: Japan
  • AP: Hong Kong, South Korea (Asia/Pacific)

Currently running Splatfest

To get the currenttly running Splatfest, you can use the getRunningSplatfests() function:

Splatoon3.getRunningSplatfests(res => {
    console.log(res);
});

Please note that the hexcolors may differ a little from the real colors. If you want the most accurate colors, you should use RGBA.

Scheduled Splatfests

To get scheduled Splatfest, that are coming in the future, you can use the getUpcomingSplatfests() function:

Splatoon3.getUpcomingSplatfests(res => {
    console.log(res);
});

Past Splatfests

To get all past Splatfests, you can use the getPastSplatfests() function:

Splatoon3.getPastSplatfests(res => {
    console.log(res);
});

Change Log

You can find the Changelog in CHANGELOG.md.

About

Splatoon3api is a simple library to get the current and next Splatoon 3 Maps (rotations), Salmonruns and Splatnet gear

https://www.npmjs.com/package/splatoon3api

License:MIT License


Languages

Language:TypeScript 99.5%Language:JavaScript 0.5%