Skip to content
JavaScript Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docker
sql
src
.eslintrc.js
.gitignore
README.md
config.js
docker-compose.yml
index.js
package-lock.json
package.json

README.md

splatoon-stats-api

Overview

This program fetches

  • League Ranking every 2 hours.
  • Splatfest schedules every day. If there's unfetched splatfest rankings, fetch them too.
  • X Ranking at every first day of the month.

Install

git clone https://github.com/yukidaruma/splatoon-stats-api.git
cd splatoon-stats-api
npm install
docker-compose build

Start

docker-compose up postgres -d

# Install pm2 if not installed.
npm install -g pm2
pm2 start npm --name splatoon-stats -- run start

# You can use these commands as soon as PM2 daemon has started
pm2 logs
pm2 stop spatoon-stats

You need to run following setup commands before first run.

cat << EOF > .env # Create .env file to override settings in config.js
iksm_session=<your iksm session>
EOF
npm run setup


# Optional steps:
# Note these 2 commands has long interval between fetching.
# It's recommended to use screen/tmux to run these tasks in background.

# Run if you want past league rankings. By default, it will fetch all league rankings since 2018-01-01.
npm run fetch-league-rankings

# Run if you want past x rankings. By default, it will fetch all x rankings since 2018-05.
npm run fetch-x-rankings

Third-party APIs

This app is using following third-party APIs.

You can’t perform that action at this time.