mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-09-13 13:05:15 -05:00
Move the SplatNet user agent string to .env
This way, if someone else uses the library it won't be attributed to splatoon2.ink.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
# Nintendo SplatNet 2 "iksm_session" value
|
||||
NINTENDO_SESSION_ID=
|
||||
|
||||
# (Optional) User agent string for SplatNet requests
|
||||
SPLATNET_USER_AGENT=
|
||||
|
||||
# Google Calendar ICS URL for Salmon Run schedules
|
||||
# Provided by: https://www.reddit.com/user/thejellydude
|
||||
SALMON_RUN_CALENDAR_ICS_URL=https://calendar.google.com/calendar/ical/7e5g474p0ng7vaejkg3mkomhks%40group.calendar.google.com/public/basic.ics
|
||||
|
||||
@@ -4,7 +4,7 @@ const path = require('path');
|
||||
const axios = require('axios');
|
||||
|
||||
// SplatNet2 API
|
||||
const userAgent = 'splatoon2inkbot/1.0 (+https://splatoon2.ink)';
|
||||
const userAgent = process.env.SPLATNET_USER_AGENT;
|
||||
const splatnetBaseUrl = 'https://app.splatoon2.nintendo.net';
|
||||
const api = axios.create({
|
||||
baseURL: `${splatnetBaseUrl}/api/`,
|
||||
|
||||
Reference in New Issue
Block a user