diff --git a/build.gradle.kts b/build.gradle.kts
index d7251f9..f2891f1 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,6 +1,6 @@
/*
* lilJudd
- * Copyright (C) 2024 moonleay
+ * Copyright (C) 2023 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,8 +21,7 @@ import org.jetbrains.gradle.ext.TaskTriggersConfig
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
- kotlin("jvm") version "1.9.22"
- kotlin("plugin.serialization") version "1.9.22"
+ kotlin("jvm") version "1.9.10"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7"
`maven-publish`
@@ -41,7 +40,6 @@ val ktorver = "2.3.7"
val exposedver = "0.45.0"
val postgresver = "42.7.1"
val krontabver = "2.2.4"
-val kotlinxserializationver = "1.6.0"
val mavenArtifact = "lilJudd"
project.base.archivesName.set(mavenArtifact)
@@ -95,9 +93,6 @@ dependencies {
//Coroutines
shadow("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesver")
- //JSON Stuff
- shadow("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinxserializationver")
-
//Logging
shadow("org.slf4j:slf4j-api:2.0.3")
shadow("org.slf4j:slf4j-simple:2.0.3")
@@ -126,8 +121,7 @@ val templateProps = mapOf(
"ktorversion" to ktorver,
"exposedversion" to exposedver,
"postgresversion" to postgresver,
- "krontabversion" to krontabver,
- "kotlinxserializationversion" to kotlinxserializationver
+ "krontabversion" to krontabver
)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/Bot.kt b/src/main/kotlin/net/moonleay/lilJudd/Bot.kt
index 8282212..fcdc5e6 100644
--- a/src/main/kotlin/net/moonleay/lilJudd/Bot.kt
+++ b/src/main/kotlin/net/moonleay/lilJudd/Bot.kt
@@ -32,7 +32,9 @@ import kotlinx.coroutines.Job
import kotlinx.coroutines.launch
import net.moonleay.lilJudd.buttons.component.EditButtonManager
import net.moonleay.lilJudd.data.CredentialManager
-import net.moonleay.lilJudd.data.api.splatoon3ink.Splatoon3Api
+import net.moonleay.lilJudd.data.api.splatoon3ink.Splatoon3ApiCache
+import net.moonleay.lilJudd.data.api.splatoon3ink.type.ApiDataType
+import net.moonleay.lilJudd.data.api.splatoon3ink.type.ApiRequestType
import net.moonleay.lilJudd.data.database.DB
import net.moonleay.lilJudd.extensions.*
import net.moonleay.lilJudd.features.AvailabilityManager
@@ -171,7 +173,7 @@ object Bot {
}
// Update the Splatoon 3 api data and make sure it stays up-to-date
- Splatoon3Api.updateSchedule()
+ Splatoon3ApiCache.updateData(ApiDataType.SCHEDULES, ApiRequestType.AUTOMATIC_CACHE_CREATION_AT_STARTUP)
JobManager.addJob(Splatoon3ApiScheduleUpdateScheduler)
/*
Other caches will be added when implemented
@@ -181,6 +183,10 @@ object Bot {
// Had to disable bc of an error.
// Will fix when I have time
+
+ //JobManager.addJob(Splatoon3ApiFestivalAndCoopUpdateScheduler)
+ //JobManager.addJob(Splatoon3ApiSplatnetGearUpdateScheduler)
+
//Start the bot
bot.start()
}
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/liljudd/LilJuddApi.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/liljudd/LilJuddApi.kt
new file mode 100644
index 0000000..d6379fa
--- /dev/null
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/liljudd/LilJuddApi.kt
@@ -0,0 +1,36 @@
+/*
+ * lilJudd
+ * Copyright (C) 2024 moonleay
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package net.moonleay.lilJudd.data.api.liljudd
+
+import net.moonleay.lilJudd.data.CredentialManager
+
+object LilJuddApi {
+ val CONFIG_BASE = "${CredentialManager.apiDomain}/config/"
+ val MATCH_BASE = "${CredentialManager.apiDomain}/match/"
+ val TIMEPLANNINGMESSAGES_BASE = "${CredentialManager.apiDomain}/tp_messages/"
+
+ // GET https://liljudd.ink/api/config//
+ // DELETE https://liljudd.ink/api/config//
+ // GET https://liljudd.ink/api/tp_messages//
+ // PUT https://liljudd.ink/api/tp_messages//
+ // POST https://liljudd.ink/api/match///
+ // PUT https://liljudd.ink/api/match////
+ // GET https://liljudd.ink/api/match//
+
+}
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/Splatoon3Api.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/Splatoon3Api.kt
index bce9a62..8f097c3 100644
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/Splatoon3Api.kt
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/Splatoon3Api.kt
@@ -1,6 +1,6 @@
/*
* lilJudd
- * Copyright (C) 2024 moonleay
+ * Copyright (C) 2023 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,21 +18,98 @@
package net.moonleay.lilJudd.data.api.splatoon3ink
-import kotlinx.serialization.json.Json
-import net.moonleay.lilJudd.data.api.splatoon3ink.schedules.Schedules
-import net.moonleay.lilJudd.util.NetUtil
-import net.moonleay.liljudd.build.BuildConstants
+import net.moonleay.lilJudd.data.api.splatoon3ink.entry.schedule.ModeData
+import net.moonleay.lilJudd.util.TimeUtil
object Splatoon3Api {
-
- var schedules: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.Schedules? = null
-
- fun updateSchedule() {
- val response = NetUtil.GETJsonData("https://splatoon3.ink/data/schedules.json", "lilJudd/${BuildConstants.version}")
- if (response.startsWith("error")){
- println("Error: $response")
- return
+ private fun getRegularMode(timestamp: Long): ModeData {
+ Splatoon3ApiCache.cachedRegularModeData.map { modeData ->
+ val startTime = TimeUtil.deformatJSONTime(modeData.startTime, "UTC")
+ val endTime = TimeUtil.deformatJSONTime(modeData.endTime, "UTC")
+ if (timestamp in startTime..endTime) {
+ return modeData
+ }
}
- schedules = Json.decodeFromString(response)
+ throw Exception("No current mode found")
+ }
+
+ private fun getOpenMode(timestamp: Long): ModeData {
+ Splatoon3ApiCache.cachedCompetitiveOpenModeData.map { modeData ->
+ val startTime = TimeUtil.deformatJSONTime(modeData.startTime, "UTC")
+ val endTime = TimeUtil.deformatJSONTime(modeData.endTime, "UTC")
+ if (timestamp in startTime..endTime) {
+ return modeData
+ }
+ }
+ throw Exception("No current mode found")
+ }
+
+ private fun getXMode(timestamp: Long): ModeData {
+ Splatoon3ApiCache.cachedXModeData.map { modeData ->
+ val startTime = TimeUtil.deformatJSONTime(modeData.startTime, "UTC")
+ val endTime = TimeUtil.deformatJSONTime(modeData.endTime, "UTC")
+ if (timestamp in startTime..endTime) {
+ return modeData
+ }
+ }
+ throw Exception("No current mode found")
+ }
+
+ private fun getSeriesMode(timestamp: Long): ModeData {
+ Splatoon3ApiCache.cachedCompetitiveSeriesModeData.map { modeData ->
+ val startTime = TimeUtil.deformatJSONTime(modeData.startTime, "UTC")
+ val endTime = TimeUtil.deformatJSONTime(modeData.endTime, "UTC")
+ if (timestamp in startTime..endTime) {
+ return modeData
+ }
+ }
+ throw Exception("No current mode found")
+ }
+
+ fun getRotationTime(timestamp: Long): String {
+ val modeData = getRegularMode(timestamp)
+ val endTime = TimeUtil.deformatJSONTime(modeData.endTime, "UTC")
+ val diffStamp = TimeUtil.getTimeDifferenceFormatted(System.currentTimeMillis(), endTime)
+ return "$diffStamp left in rotation"
+ }
+
+ fun getRegularMapsFormatted(timestamp: Long): String {
+ val modeData = getRegularMode(timestamp)
+ val map1 = modeData.map1!!.name.split(" ")[0]
+ val map2 = modeData.map2!!.name.split(" ")[0]
+ return "R: $map1, $map2"
+ }
+
+ fun getOpenMapFormatted(timestamp: Long): String {
+ val modeData = getOpenMode(timestamp)
+ val map1 = modeData.map1!!.name.split(" ")[0]
+ val map2 = modeData.map2!!.name.split(" ")[0]
+ return "O: ${modeData.ruleSetName}: $map1, $map2"
+ .replace("Rainmaker", "RMK")
+ .replace("Tower Control", "TC")
+ .replace("Splat Zones", "SZ")
+ .replace("Clam Blitz", "CB")
+ }
+
+ fun getSeriesMapsFormatted(timestamp: Long): String {
+ val modeData = getSeriesMode(timestamp)
+ val map1 = modeData.map1!!.name.split(" ")[0]
+ val map2 = modeData.map2!!.name.split(" ")[0]
+ return "S: ${modeData.ruleSetName}: $map1, $map2"
+ .replace("Rainmaker", "RMK")
+ .replace("Tower Control", "TC")
+ .replace("Splat Zones", "SZ")
+ .replace("Clam Blitz", "CB")
+ }
+
+ fun getXMapFormatted(timestamp: Long): String {
+ val modeData = getXMode(timestamp)
+ val map1 = modeData.map1!!.name.split(" ")[0]
+ val map2 = modeData.map2!!.name.split(" ")[0]
+ return "X: ${modeData.ruleSetName}: $map1, $map2"
+ .replace("Rainmaker", "RMK")
+ .replace("Tower Control", "TC")
+ .replace("Splat Zones", "SZ")
+ .replace("Clam Blitz", "CB")
}
}
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/Splatoon3ApiCache.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/Splatoon3ApiCache.kt
new file mode 100644
index 0000000..30a9129
--- /dev/null
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/Splatoon3ApiCache.kt
@@ -0,0 +1,577 @@
+/*
+ * lilJudd
+ * Copyright (C) 2023 moonleay
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package net.moonleay.lilJudd.data.api.splatoon3ink
+
+import io.ktor.http.*
+import kotlinx.serialization.json.*
+import net.moonleay.lilJudd.data.api.splatoon3ink.entry.coop.CoopGearData
+import net.moonleay.lilJudd.data.api.splatoon3ink.entry.schedule.*
+import net.moonleay.lilJudd.data.api.splatoon3ink.entry.splatfest.SplatfestColor
+import net.moonleay.lilJudd.data.api.splatoon3ink.entry.splatfest.SplatfestData
+import net.moonleay.lilJudd.data.api.splatoon3ink.entry.splatfest.SplatfestTeamData
+import net.moonleay.lilJudd.data.api.splatoon3ink.entry.splatfest.SplatfestTeamResults
+import net.moonleay.lilJudd.data.api.splatoon3ink.entry.splatnet.BrandData
+import net.moonleay.lilJudd.data.api.splatoon3ink.entry.splatnet.GearAbilityData
+import net.moonleay.lilJudd.data.api.splatoon3ink.entry.splatnet.SplatnetItemData
+import net.moonleay.lilJudd.data.api.splatoon3ink.type.ApiDataType
+import net.moonleay.lilJudd.data.api.splatoon3ink.type.ApiRequestType
+import net.moonleay.lilJudd.util.Logger
+import net.moonleay.lilJudd.util.NetUtil
+import net.moonleay.liljudd.build.BuildConstants
+
+object Splatoon3ApiCache {
+ private val user_agent =
+ "lilJudd/${BuildConstants.version} (${System.getProperty("os.name")}/${System.getProperty("os.version")}) [contact@moonleay.net]"
+ private val base_url = "https://splatoon3.ink/data/" // Thank god there is an API
+
+ internal var cachedSplatfestData = mutableListOf()
+ internal var cachedMapData = mutableMapOf()
+ internal var cachedRegularModeData = mutableListOf()
+ internal var cachedCompetitiveSeriesModeData = mutableListOf()
+ internal var cachedCompetitiveOpenModeData = mutableListOf()
+ internal var cachedXModeData = mutableListOf()
+ internal var cachedChallengesData = mutableListOf()
+ internal var cachedShiftData = mutableListOf()
+ internal var cachedBigRunShiftData = mutableListOf()
+ internal var cachedCoopRewardsData =
+ mutableListOf()
+ internal var cachedSplatnetItemData = mutableListOf()
+ internal var cachedSplatnetLimitedItemData = mutableListOf()
+ internal lateinit var splatnetShopBrandData: BrandData
+ internal lateinit var splatnetShopNextBrandData: BrandData
+ fun updateData(dataType: ApiDataType, requestType: ApiRequestType) {
+ Logger.out("Updating data for $dataType with USER-AGENT: ${user_agent}")
+ Logger.out("Reason for update: $requestType")
+ when (dataType) {
+ ApiDataType.SCHEDULES -> {
+ updateScheduleCache(user_agent)
+ }
+
+ ApiDataType.SPLATNETGEAR -> {
+ updateSplatnetGearCache(user_agent)
+ }
+
+ ApiDataType.COOP -> {
+ updateCOOPCache(user_agent)
+ }
+
+ ApiDataType.SPLATFESTS -> {
+ updateSplatfestCache(user_agent)
+ }
+
+ ApiDataType.ALL -> {
+ updateScheduleCache(user_agent)
+ updateSplatnetGearCache(user_agent)
+ updateSplatfestCache(user_agent)
+ updateCOOPCache(user_agent)
+ }
+ }
+ Logger.out("Finished updating data for $dataType")
+ }
+
+ private fun updateSplatnetGearCache(uag: String) {
+ val apiResponse = NetUtil.GETJsonData("${base_url}gear.json", uag)
+ if (apiResponse.startsWith("Error")) {
+ Logger.out("Error getting splatnet data: $apiResponse")
+ return
+ }
+ val json = Json.parseToJsonElement(apiResponse)
+ val pickupBrandData = json.jsonObject["data"]!!.jsonObject["gesotown"]!!.jsonObject["pickupBrand"]!!.jsonObject
+
+ val brand = pickupBrandData["brand"]!!.jsonObject
+ splatnetShopBrandData =
+ BrandData(
+ brand["name"]!!.jsonPrimitive.content,
+ Url(pickupBrandData["image"]!!.jsonObject["url"]!!.jsonPrimitive.content),
+ GearAbilityData(
+ brand["usualGearPower"]!!.jsonObject["name"]!!.jsonPrimitive.content,
+ brand["usualGearPower"]!!.jsonObject["desc"]!!.jsonPrimitive.content,
+ Url(brand["usualGearPower"]!!.jsonObject["image"]!!.jsonObject["url"]!!.jsonPrimitive.content)
+ ),
+ pickupBrandData["saleEndTime"]!!.jsonPrimitive.content
+ )
+ val nextBrand = pickupBrandData["nextBrand"]!!.jsonObject
+ splatnetShopNextBrandData =
+ BrandData(
+ nextBrand["name"]!!.jsonPrimitive.content,
+ Url(pickupBrandData["image"]!!.jsonObject["url"]!!.jsonPrimitive.content),
+ null,
+ null
+ )
+ cachedSplatnetItemData = mutableListOf()
+ val items = pickupBrandData["brandGears"]!!.jsonArray
+ items.forEach {
+ val obj = it as JsonObject
+ val gear = it["gear"]!!.jsonObject
+ val primaryGearPower = gear["primaryGearPower"]!!.jsonObject
+ val additionalGearPowers = gear["additionalGearPowers"]!!.jsonArray
+ val additionalGearPowersList = mutableListOf()
+ additionalGearPowers.forEach {
+ val ob = it as JsonObject
+ additionalGearPowersList.add(
+ GearAbilityData(
+ ob["name"]!!.jsonPrimitive.content,
+ null,
+ Url(ob["image"]!!.jsonObject["url"]!!.jsonPrimitive.content)
+ )
+ )
+ }
+ cachedSplatnetItemData.add(
+ SplatnetItemData(
+ obj["saleEndTime"]!!.jsonPrimitive.content,
+ obj["price"]!!.jsonPrimitive.int,
+ gear["__typename"]!!.jsonPrimitive.content,
+ gear["name"]!!.jsonPrimitive.content,
+ GearAbilityData(
+ primaryGearPower["name"]!!.jsonPrimitive.content,
+ null,
+ Url(primaryGearPower["image"]!!.jsonObject["url"]!!.jsonPrimitive.content)
+ ),
+ additionalGearPowersList,
+ Url(gear["image"]!!.jsonObject["url"]!!.jsonPrimitive.content),
+ splatnetShopBrandData
+ )
+ )
+ }
+ Logger.out("Updated gear data")
+
+ val limitedItemData = json.jsonObject["data"]!!.jsonObject["gesotown"]!!.jsonObject["limitedGears"]!!.jsonArray
+ cachedSplatnetLimitedItemData = mutableListOf()
+ limitedItemData.forEach {
+ val obj = it as JsonObject
+ val gear = obj["gear"]!!.jsonObject
+ val additionalGearPowers = gear["additionalGearPowers"]!!.jsonArray
+ val additionalGearPowersList = mutableListOf()
+ additionalGearPowers.forEach {
+ val ob = it as JsonObject
+ additionalGearPowersList.add(
+ GearAbilityData(
+ ob["name"]!!.jsonPrimitive.content,
+ null,
+ Url(ob["image"]!!.jsonObject["url"]!!.jsonPrimitive.content)
+ )
+ )
+ }
+ cachedSplatnetLimitedItemData.add(
+ SplatnetItemData(
+ obj["saleEndTime"]!!.jsonPrimitive.content,
+ obj["price"]!!.jsonPrimitive.int,
+ gear["__typename"]!!.jsonPrimitive.content,
+ gear["name"]!!.jsonPrimitive.content,
+ GearAbilityData(
+ gear["primaryGearPower"]!!.jsonObject["name"]!!.jsonPrimitive.content,
+ null,
+ Url(gear["primaryGearPower"]!!.jsonObject["image"]!!.jsonObject["url"]!!.jsonPrimitive.content)
+ ),
+ additionalGearPowersList,
+ Url(gear["image"]!!.jsonObject["url"]!!.jsonPrimitive.content),
+ splatnetShopBrandData
+ )
+ )
+ }
+ }
+
+ private fun updateCOOPCache(uag: String) {
+ val apiResponse = NetUtil.GETJsonData("${base_url}coop.json", uag)
+ if (apiResponse.startsWith("Error")) {
+ Logger.out("Error getting coop data: $apiResponse")
+ return
+ }
+ try {
+ val json = Json.parseToJsonElement(apiResponse)
+ val data = json.jsonObject["data"]!!.jsonObject["coopResult"]!!.jsonObject["monthlyGear"]!!.jsonObject
+ cachedCoopRewardsData = mutableListOf()
+ cachedCoopRewardsData.add(
+ CoopGearData(
+ data["name"]!!.jsonPrimitive.content,
+ Url(data["image"]!!.jsonObject["url"]!!.jsonPrimitive.content),
+ data["__typename"]!!.jsonPrimitive.content
+ )
+ )
+ Logger.out("Updated COOP data")
+ } catch (e: Exception) {
+ Logger.out("Error getting coop data: ${e.cause}")
+ }
+ }
+
+ private fun updateScheduleCache(uag: String) {
+ val apiResponse = NetUtil.GETJsonData("${base_url}schedules.json", uag)
+ if (apiResponse.startsWith("Error")) {
+ Logger.out("Error getting schedule data: $apiResponse")
+ return
+ }
+ val json = Json.decodeFromString(apiResponse) as JsonObject
+ val data = json["data"]!!.jsonObject
+
+ try {
+ val mapList = data["vsStages"]!!.jsonObject["nodes"]!!.jsonArray
+ cachedMapData = mutableMapOf()
+ mapList.forEach {
+ val obj = it as JsonObject
+ val imageURL = Url(obj.jsonObject["originalImage"]!!.jsonObject["url"]!!.jsonPrimitive.content)
+ val id = obj.jsonObject["vsStageId"]!!.jsonPrimitive.int
+ cachedMapData[id] =
+ MapData(
+ id,
+ imageURL,
+ it.jsonObject["name"]!!.jsonPrimitive.content
+ )
+ }
+ Logger.out("Updated maplist data")
+ } catch (e: Exception) {
+ Logger.out("Error getting maplist data: ${e.cause}")
+ }
+
+ try {
+ val regularMatches = data["regularSchedules"]!!.jsonObject["nodes"]!!.jsonArray
+ cachedRegularModeData = mutableListOf()
+ regularMatches.forEach {
+ val obj = it as JsonObject
+ val setting = obj["regularMatchSetting"]!!.jsonObject
+ cachedRegularModeData.add(
+ ModeData(
+ obj["startTime"]!!.jsonPrimitive.content,
+ obj["endTime"]!!.jsonPrimitive.content,
+ setting["__typename"]!!.jsonPrimitive.content,
+ cachedMapData[setting["vsStages"]!!.jsonArray[0].jsonObject["vsStageId"]!!.jsonPrimitive.int],
+ cachedMapData[setting["vsStages"]!!.jsonArray[1].jsonObject["vsStageId"]!!.jsonPrimitive.int],
+ setting["vsRule"]!!.jsonObject["name"]!!.jsonPrimitive.content,
+ setting["vsRule"]!!.jsonObject["rule"]!!.jsonPrimitive.content,
+ "TURF_WAR"
+ )
+ )
+ }
+ Logger.out("Updated Regular match data")
+ } catch (e: Exception) {
+ Logger.out("Error getting regular match data: ${e.cause}")
+ }
+
+ try {
+ val compMatches = data["bankaraSchedules"]!!.jsonObject["nodes"]!!.jsonArray
+ cachedCompetitiveSeriesModeData = mutableListOf()
+ cachedCompetitiveOpenModeData = mutableListOf()
+ compMatches.forEach {
+ val obj = it as JsonObject
+ val setting = obj["bankaraMatchSettings"]!!.jsonArray
+ setting.forEach {
+ val ob = it as JsonObject
+ val mode = ob["bankaraMode"]!!.jsonPrimitive.content
+ if (mode == "CHALLENGE") {
+ cachedCompetitiveSeriesModeData.add(
+ ModeData(
+ obj["startTime"]!!.jsonPrimitive.content,
+ obj["endTime"]!!.jsonPrimitive.content,
+ ob["__typename"]!!.jsonPrimitive.content,
+ cachedMapData[ob["vsStages"]!!.jsonArray[0].jsonObject["vsStageId"]!!.jsonPrimitive.int],
+ cachedMapData[ob["vsStages"]!!.jsonArray[1].jsonObject["vsStageId"]!!.jsonPrimitive.int],
+ ob["vsRule"]!!.jsonObject["name"]!!.jsonPrimitive.content,
+ ob["vsRule"]!!.jsonObject["rule"]!!.jsonPrimitive.content,
+ mode
+ )
+ )
+ } else if (mode == "OPEN") {
+ cachedCompetitiveOpenModeData.add(
+ ModeData(
+ obj["startTime"]!!.jsonPrimitive.content,
+ obj["endTime"]!!.jsonPrimitive.content,
+ ob["__typename"]!!.jsonPrimitive.content,
+ cachedMapData[ob["vsStages"]!!.jsonArray[0].jsonObject["vsStageId"]!!.jsonPrimitive.int],
+ cachedMapData[ob["vsStages"]!!.jsonArray[1].jsonObject["vsStageId"]!!.jsonPrimitive.int],
+ ob["vsRule"]!!.jsonObject["name"]!!.jsonPrimitive.content,
+ ob["vsRule"]!!.jsonObject["rule"]!!.jsonPrimitive.content,
+ mode
+ )
+ )
+ }
+ }
+ }
+ Logger.out("Updated Competitive match data")
+
+ } catch (e: Exception) {
+ Logger.out("Error getting competitive match data: ${e.cause}")
+ }
+ try {
+ val xMatches = data["xSchedules"]!!.jsonObject["nodes"]!!.jsonArray
+ cachedXModeData = mutableListOf()
+ xMatches.forEach {
+ val obj = it as JsonObject
+ val setting = obj["xMatchSetting"]!!.jsonObject
+ cachedXModeData.add(
+ ModeData(
+ obj["startTime"]!!.jsonPrimitive.content,
+ obj["endTime"]!!.jsonPrimitive.content,
+ setting["__typename"]!!.jsonPrimitive.content,
+ cachedMapData[setting["vsStages"]!!.jsonArray[0].jsonObject["vsStageId"]!!.jsonPrimitive.int],
+ cachedMapData[setting["vsStages"]!!.jsonArray[1].jsonObject["vsStageId"]!!.jsonPrimitive.int],
+ setting["vsRule"]!!.jsonObject["name"]!!.jsonPrimitive.content,
+ setting["vsRule"]!!.jsonObject["rule"]!!.jsonPrimitive.content,
+ "X"
+ )
+ )
+ }
+ Logger.out("Updated X match data")
+ } catch (e: Exception) {
+ Logger.out("Error getting X match data: ${e.cause}")
+ }
+
+ try {
+ val challengeData = data["eventSchedules"]!!.jsonObject["nodes"]!!.jsonArray
+ cachedChallengesData = mutableListOf()
+ challengeData.forEach {
+ val obj = it as JsonObject
+ val tpd = obj["timePeriods"]!!.jsonArray
+ val setting = obj["leagueMatchSetting"]!!.jsonObject
+ val event = setting["leagueMatchEvent"]!!.jsonObject
+ cachedChallengesData.add(
+ ChallengeModeData(
+ event["leagueMatchEventId"]!!.jsonPrimitive.content,
+ event["name"]!!.jsonPrimitive.content,
+ event["desc"]!!.jsonPrimitive.content,
+ event["regulation"]!!.jsonPrimitive.content,
+ cachedMapData[setting["vsStages"]!!.jsonArray[0].jsonObject["vsStageId"]!!.jsonPrimitive.int],
+ cachedMapData[setting["vsStages"]!!.jsonArray[1].jsonObject["vsStageId"]!!.jsonPrimitive.int],
+ setting["__typename"]!!.jsonPrimitive.content,
+ setting["vsRule"]!!.jsonObject["rule"]!!.jsonPrimitive.content,
+ setting["vsRule"]!!.jsonObject["name"]!!.jsonPrimitive.content,
+ TimePeriodData(
+ tpd[0].jsonObject["startTime"]!!.jsonPrimitive.content,
+ tpd[0].jsonObject["endTime"]!!.jsonPrimitive.content
+ ),
+ TimePeriodData(
+ tpd[1].jsonObject["startTime"]!!.jsonPrimitive.content,
+ tpd[1].jsonObject["endTime"]!!.jsonPrimitive.content
+ ),
+ TimePeriodData(
+ tpd[2].jsonObject["startTime"]!!.jsonPrimitive.content,
+ tpd[2].jsonObject["endTime"]!!.jsonPrimitive.content
+ )
+ )
+ )
+ }
+ Logger.out("Updated Challenge data")
+ } catch (e: Exception) {
+ Logger.out("Error getting Challenge data: ${e.cause}")
+ }
+
+ try {
+ val shiftData =
+ data["coopGroupingSchedule"]!!.jsonObject["regularSchedules"]!!.jsonObject["nodes"]!!.jsonArray
+ cachedShiftData = mutableListOf()
+ shiftData.forEach {
+ val obj = it as JsonObject
+ val setting = obj["setting"]!!.jsonObject
+ val stage = setting["coopStage"]!!.jsonObject
+ val weapons = setting["weapons"]!!.jsonArray
+ cachedShiftData.add(
+ ShiftData(
+ obj["startTime"]!!.jsonPrimitive.content,
+ obj["endTime"]!!.jsonPrimitive.content,
+ obj["__splatoon3ink_king_salmonid_guess"]!!.jsonPrimitive.content,
+ setting["__typename"]!!.jsonPrimitive.content,
+ stage["name"]!!.jsonPrimitive.content,
+ Url(stage["image"]!!.jsonObject["url"]!!.jsonPrimitive.content),
+ WeaponData(
+ weapons[0].jsonObject["name"]!!.jsonPrimitive.content,
+ Url(weapons[0].jsonObject["image"]!!.jsonObject["url"]!!.jsonPrimitive.content)
+ ),
+ WeaponData(
+ weapons[1].jsonObject["name"]!!.jsonPrimitive.content,
+ Url(weapons[1].jsonObject["image"]!!.jsonObject["url"]!!.jsonPrimitive.content)
+ ),
+ WeaponData(
+ weapons[2].jsonObject["name"]!!.jsonPrimitive.content,
+ Url(weapons[2].jsonObject["image"]!!.jsonObject["url"]!!.jsonPrimitive.content)
+ ),
+ WeaponData(
+ weapons[3].jsonObject["name"]!!.jsonPrimitive.content,
+ Url(weapons[3].jsonObject["image"]!!.jsonObject["url"]!!.jsonPrimitive.content)
+ )
+ )
+ )
+ }
+ Logger.out("Updated shift data")
+ } catch (e: Exception) {
+ Logger.out("Error getting coopGrouping data: ${e.cause}")
+ }
+
+ try {
+ val bigRunData =
+ data["coopGroupingSchedule"]!!.jsonObject["bigRunSchedules"]!!.jsonObject["nodes"]!!.jsonArray
+ cachedBigRunShiftData = mutableListOf()
+ bigRunData.forEach {
+ val obj = it as JsonObject
+ val setting = obj["setting"]!!.jsonObject
+ val stage = setting["coopStage"]!!.jsonObject
+ val weapons = setting["weapons"]!!.jsonArray
+ cachedBigRunShiftData.add(
+ ShiftData(
+ obj["startTime"]!!.jsonPrimitive.content,
+ obj["endTime"]!!.jsonPrimitive.content,
+ obj["__splatoon3ink_king_salmonid_guess"]!!.jsonPrimitive.content,
+ setting["__typename"]!!.jsonPrimitive.content,
+ stage["name"]!!.jsonPrimitive.content,
+ Url(stage["image"]!!.jsonObject["url"]!!.jsonPrimitive.content),
+ WeaponData(
+ weapons[0].jsonObject["name"]!!.jsonPrimitive.content,
+ Url(weapons[0].jsonObject["image"]!!.jsonObject["url"]!!.jsonPrimitive.content)
+ ),
+ WeaponData(
+ weapons[1].jsonObject["name"]!!.jsonPrimitive.content,
+ Url(weapons[1].jsonObject["image"]!!.jsonObject["url"]!!.jsonPrimitive.content)
+ ),
+ WeaponData(
+ weapons[2].jsonObject["name"]!!.jsonPrimitive.content,
+ Url(weapons[2].jsonObject["image"]!!.jsonObject["url"]!!.jsonPrimitive.content)
+ ),
+ WeaponData(
+ weapons[3].jsonObject["name"]!!.jsonPrimitive.content,
+ Url(weapons[3].jsonObject["image"]!!.jsonObject["url"]!!.jsonPrimitive.content)
+ )
+ )
+ )
+ }
+ Logger.out("Updated big run data")
+ } catch (e: Exception) {
+ Logger.out("Error getting big run data: ${e.cause}")
+ }
+
+ Logger.out("Updated all Schedules")
+ }
+
+ private fun updateSplatfestCache(uag: String) {
+ val apiResponse = NetUtil.GETJsonData("${base_url}festivals.json", uag)
+ if (apiResponse.startsWith("Error")) {
+ Logger.out("Error getting splatfest data: $apiResponse")
+ return
+ }
+ try {
+ val json = Json.decodeFromString(apiResponse) as JsonObject
+ val festivals =
+ json["US"]!!.jsonObject["data"]!!.jsonObject["festRecords"]!!.jsonObject["nodes"]!!.jsonArray
+ cachedSplatfestData = mutableListOf()
+ festivals.forEach {
+ val fest = it as JsonObject
+ val teams = fest.jsonObject["teams"]!!.jsonArray
+ val team1 = teams[0].jsonObject
+ val team1Color = team1["color"]!!.jsonObject
+ var team1Result: JsonObject? = null
+ if (team1["result"] !is JsonNull) {
+ team1Result = team1["result"]!!.jsonObject
+ }
+ val team2 = teams[1].jsonObject
+ val team2Color = team2["color"]!!.jsonObject
+ var team2Result: JsonObject? = null
+ if (team2["result"] !is JsonNull) {
+ team2Result = team2["result"]!!.jsonObject
+ }
+ val team3 = teams[2].jsonObject
+ val team3Color = team3["color"]!!.jsonObject
+ var team3Result: JsonObject? = null
+ if (team3["result"] !is JsonNull) {
+ team3Result = team3["result"]!!.jsonObject
+ }
+ cachedSplatfestData.add(
+ SplatfestData(
+ fest.jsonObject["id"]!!.jsonPrimitive.content,
+ fest.jsonObject["state"]!!.jsonPrimitive.content,
+ fest.jsonObject["startTime"]!!.jsonPrimitive.content,
+ fest.jsonObject["endTime"]!!.jsonPrimitive.content,
+ fest.jsonObject["title"]!!.jsonPrimitive.content,
+ Url(fest.jsonObject["image"]!!.jsonObject["url"]!!.jsonPrimitive.content),
+ SplatfestTeamData(
+ team1["teamName"]!!.jsonPrimitive.content,
+ SplatfestColor(
+ team1Color["a"]!!.jsonPrimitive.int,
+ team1Color["b"]!!.jsonPrimitive.double,
+ team1Color["g"]!!.jsonPrimitive.double,
+ team1Color["r"]!!.jsonPrimitive.double
+ ),
+ if (team1Result.isNullOrEmpty() || team1Result["tricolorContributionRatio"]!!.jsonPrimitive.doubleOrNull == null)
+ null
+ else SplatfestTeamResults(
+ team1Result["isWinner"]!!.jsonPrimitive.boolean,
+ team1Result["horagaiRatio"]!!.jsonPrimitive.double,
+ team1Result["isHoragaiRatioTop"]!!.jsonPrimitive.boolean,
+ team1Result["voteRatio"]!!.jsonPrimitive.double,
+ team1Result["isVoteRatioTop"]!!.jsonPrimitive.boolean,
+ team1Result["regularContributionRatio"]!!.jsonPrimitive.double,
+ team1Result["isRegularContributionRatioTop"]!!.jsonPrimitive.boolean,
+ team1Result["challengeContributionRatio"]!!.jsonPrimitive.double,
+ team1Result["isChallengeContributionRatioTop"]!!.jsonPrimitive.boolean,
+ team1Result["tricolorContributionRatio"]!!.jsonPrimitive.double,
+ team1Result["isTricolorContributionRatioTop"]!!.jsonPrimitive.boolean,
+ )
+ ),
+ SplatfestTeamData(
+ team2["teamName"]!!.jsonPrimitive.content,
+ SplatfestColor(
+ team2Color["a"]!!.jsonPrimitive.int,
+ team2Color["b"]!!.jsonPrimitive.double,
+ team2Color["g"]!!.jsonPrimitive.double,
+ team2Color["r"]!!.jsonPrimitive.double
+ ),
+ if (team2Result.isNullOrEmpty() || team2Result["tricolorContributionRatio"]!!.jsonPrimitive.doubleOrNull == null)
+ null
+ else SplatfestTeamResults(
+ team2Result["isWinner"]!!.jsonPrimitive.boolean,
+ team2Result["horagaiRatio"]!!.jsonPrimitive.double,
+ team2Result["isHoragaiRatioTop"]!!.jsonPrimitive.boolean,
+ team2Result["voteRatio"]!!.jsonPrimitive.double,
+ team2Result["isVoteRatioTop"]!!.jsonPrimitive.boolean,
+ team2Result["regularContributionRatio"]!!.jsonPrimitive.double,
+ team2Result["isRegularContributionRatioTop"]!!.jsonPrimitive.boolean,
+ team2Result["challengeContributionRatio"]!!.jsonPrimitive.double,
+ team2Result["isChallengeContributionRatioTop"]!!.jsonPrimitive.boolean,
+ team2Result["tricolorContributionRatio"]!!.jsonPrimitive.double,
+ team2Result["isTricolorContributionRatioTop"]!!.jsonPrimitive.boolean,
+ )
+ ),
+ SplatfestTeamData(
+ team3["teamName"]!!.jsonPrimitive.content,
+ SplatfestColor(
+ team3Color["a"]!!.jsonPrimitive.int,
+ team3Color["b"]!!.jsonPrimitive.double,
+ team3Color["g"]!!.jsonPrimitive.double,
+ team3Color["r"]!!.jsonPrimitive.double
+ ),
+ if (team3Result.isNullOrEmpty() || team3Result["tricolorContributionRatio"]!!.jsonPrimitive.doubleOrNull == null)
+ null
+ else SplatfestTeamResults(
+ team3Result["isWinner"]!!.jsonPrimitive.boolean,
+ team3Result["horagaiRatio"]!!.jsonPrimitive.double,
+ team3Result["isHoragaiRatioTop"]!!.jsonPrimitive.boolean,
+ team3Result["voteRatio"]!!.jsonPrimitive.double,
+ team3Result["isVoteRatioTop"]!!.jsonPrimitive.boolean,
+ team3Result["regularContributionRatio"]!!.jsonPrimitive.double,
+ team3Result["isRegularContributionRatioTop"]!!.jsonPrimitive.boolean,
+ team3Result["challengeContributionRatio"]!!.jsonPrimitive.double,
+ team3Result["isChallengeContributionRatioTop"]!!.jsonPrimitive.boolean,
+ team3Result["tricolorContributionRatio"]!!.jsonPrimitive.double,
+ team3Result["isTricolorContributionRatioTop"]!!.jsonPrimitive.boolean,
+ )
+ ),
+ )
+ )
+ }
+ Logger.out("Updated Splatfest data")
+ } catch (e: Exception) {
+ Logger.out("Error getting splatfest data: ${e.cause}")
+ }
+ }
+}
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/Splatoon3ApiDataGrabber.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/Splatoon3ApiDataGrabber.kt
deleted file mode 100644
index 6a9eedf..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/Splatoon3ApiDataGrabber.kt
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2023 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink
-
-import net.moonleay.lilJudd.data.api.splatoon3ink.schedules.BankaraNode
-import net.moonleay.lilJudd.data.api.splatoon3ink.schedules.RegularNode
-import net.moonleay.lilJudd.data.api.splatoon3ink.schedules.XNode
-import net.moonleay.lilJudd.util.TimeUtil
-
-object Splatoon3ApiDataGrabber {
- private fun getRegularMode(timestamp: Long): net.moonleay.lilJudd.data.api.splatoon3ink.schedules.RegularNode {
- Splatoon3Api.schedules!!.data.regularSchedules.nodes.map { modeData ->
- val startTime = TimeUtil.deformatJSONTime(modeData.startTime, "UTC")
- val endTime = TimeUtil.deformatJSONTime(modeData.endTime, "UTC")
- if (timestamp in startTime..endTime) {
- return modeData
- }
- }
- throw Exception("No current mode found")
- }
-
- private fun getOpenMode(timestamp: Long): net.moonleay.lilJudd.data.api.splatoon3ink.schedules.BankaraNode {
- Splatoon3Api.schedules!!.data.bankaraSchedules.nodes.map { modeData ->
- val startTime = TimeUtil.deformatJSONTime(modeData.startTime, "UTC")
- val endTime = TimeUtil.deformatJSONTime(modeData.endTime, "UTC")
- if (timestamp in startTime..endTime) {
- modeData.bankaraMatchSettings!!.map { matchSetting ->
- if (matchSetting.bankaraMode == "OPEN")
- return modeData
- }
- }
- }
- throw Exception("No current mode found")
- }
-
- private fun getXMode(timestamp: Long): net.moonleay.lilJudd.data.api.splatoon3ink.schedules.XNode {
- Splatoon3Api.schedules!!.data.xSchedules.nodes.map { modeData ->
- val startTime = TimeUtil.deformatJSONTime(modeData.startTime, "UTC")
- val endTime = TimeUtil.deformatJSONTime(modeData.endTime, "UTC")
- if (timestamp in startTime..endTime) {
- return modeData
- }
- }
- throw Exception("No current mode found")
- }
-
- private fun getSeriesMode(timestamp: Long): net.moonleay.lilJudd.data.api.splatoon3ink.schedules.BankaraNode {
- Splatoon3Api.schedules!!.data.bankaraSchedules.nodes.map { modeData ->
- val startTime = TimeUtil.deformatJSONTime(modeData.startTime, "UTC")
- val endTime = TimeUtil.deformatJSONTime(modeData.endTime, "UTC")
- if (timestamp in startTime..endTime) {
- modeData.bankaraMatchSettings!!.map { matchSetting ->
- if (matchSetting.bankaraMode == "CHALLENGE")
- return modeData
- }
- }
- }
- throw Exception("No current mode found")
- }
-
- fun getRotationTime(timestamp: Long): String {
- val modeData = getRegularMode(timestamp)
- val endTime = TimeUtil.deformatJSONTime(modeData.endTime, "UTC")
- val diffStamp = TimeUtil.getTimeDifferenceFormatted(System.currentTimeMillis(), endTime)
- return "$diffStamp left in rotation"
- }
-
- fun getRegularMapsFormatted(timestamp: Long): String {
- val modeData = getRegularMode(timestamp)
- val map1 = modeData.regularMatchSetting.vsStages[0].name.split(" ")[0]
- val map2 = modeData.regularMatchSetting.vsStages[1].name.split(" ")[0]
- return "R: $map1, $map2"
- }
-
- fun getOpenMapFormatted(timestamp: Long): String {
- val modeData = getOpenMode(timestamp)
- // FIXME: This may cause issues if there is a Splatfest going on
- // TODO: Check if this works during splatfest
- // The Open Mode should always be the second mode in the list
- // FIXME: Add check if 2nd itm in list is open mode
- val map1 = modeData.bankaraMatchSettings!![1].vsStages[0].name.split(" ")[0]
- val map2 = modeData.bankaraMatchSettings[1].vsStages[1].name.split(" ")[0]
- return "O: ${modeData.bankaraMatchSettings[1].vsRule.name}: $map1, $map2"
- .replace("Rainmaker", "RMK")
- .replace("Tower Control", "TC")
- .replace("Splat Zones", "SZ")
- .replace("Clam Blitz", "CB")
- }
-
- fun getSeriesMapsFormatted(timestamp: Long): String {
- val modeData = getSeriesMode(timestamp)
- // FIXME: This may cause issues if there is a Splatfest going on
- // TODO: Check all the same things as in getOpenMapFormatted
- val map1 = modeData.bankaraMatchSettings!![0].vsStages[0].name.split(" ")[0]
- val map2 = modeData.bankaraMatchSettings[0].vsStages[1].name.split(" ")[0]
- return "S: ${modeData.bankaraMatchSettings[0].vsRule.name}: $map1, $map2"
- .replace("Rainmaker", "RMK")
- .replace("Tower Control", "TC")
- .replace("Splat Zones", "SZ")
- .replace("Clam Blitz", "CB")
- }
-
- fun getXMapFormatted(timestamp: Long): String {
- val modeData = getXMode(timestamp)
- val map1 = modeData.xMatchSetting.vsStages[0].name.split(" ")[0]
- val map2 = modeData.xMatchSetting.vsStages[1].name.split(" ")[0]
- return "X: ${modeData.xMatchSetting.vsRule.name}: $map1, $map2"
- .replace("Rainmaker", "RMK")
- .replace("Tower Control", "TC")
- .replace("Splat Zones", "SZ")
- .replace("Clam Blitz", "CB")
- }
-}
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/coop/CoopGearData.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/coop/CoopGearData.kt
new file mode 100644
index 0000000..817a80a
--- /dev/null
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/coop/CoopGearData.kt
@@ -0,0 +1,28 @@
+/*
+ * lilJudd
+ * Copyright (C) 2023 moonleay
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package net.moonleay.lilJudd.data.api.splatoon3ink.entry.coop
+
+import io.ktor.http.*
+
+data class CoopGearData(
+ val name: String,
+ val image: Url,
+ val __typename: String,
+
+ )
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/LeagueMatchEvent.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/ChallengeModeData.kt
similarity index 61%
rename from src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/LeagueMatchEvent.kt
rename to src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/ChallengeModeData.kt
index 64fe6b9..87efd9d 100644
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/LeagueMatchEvent.kt
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/ChallengeModeData.kt
@@ -1,6 +1,6 @@
/*
* lilJudd
- * Copyright (C) 2024 moonleay
+ * Copyright (C) 2023 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,24 +16,19 @@
* along with this program. If not, see .
*/
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
+package net.moonleay.lilJudd.data.api.splatoon3ink.entry.schedule
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class LeagueMatchEvent(
- @SerialName("desc")
- val desc: String,
- @SerialName("id")
- val id: String,
- @SerialName("leagueMatchEventId")
+data class ChallengeModeData(
val leagueMatchEventId: String,
- @SerialName("name")
val name: String,
- @SerialName("regulation")
+ val description: String,
val regulation: String,
- @SerialName("regulationUrl")
- val regulationUrl: String? // is null
+ val map1: MapData?,
+ val map2: MapData?,
+ val __typename: String,
+ val ruleSet: String,
+ val ruleSetName: String,
+ val timePeriod1: TimePeriodData,
+ val timePeriod2: TimePeriodData,
+ val timePeriod3: TimePeriodData,
)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Image.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/MapData.kt
similarity index 72%
rename from src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Image.kt
rename to src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/MapData.kt
index f635fa6..b64755d 100644
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Image.kt
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/MapData.kt
@@ -1,6 +1,6 @@
/*
* lilJudd
- * Copyright (C) 2024 moonleay
+ * Copyright (C) 2023 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,14 +16,12 @@
* along with this program. If not, see .
*/
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
+package net.moonleay.lilJudd.data.api.splatoon3ink.entry.schedule
+import io.ktor.http.*
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class Image(
- @SerialName("url")
- val url: String
+data class MapData(
+ val stageID: Int,
+ val image: Url,
+ val name: String,
)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/TimePeriod.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/ModeData.kt
similarity index 70%
rename from src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/TimePeriod.kt
rename to src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/ModeData.kt
index 99037bf..c3ad3dc 100644
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/TimePeriod.kt
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/ModeData.kt
@@ -1,6 +1,6 @@
/*
* lilJudd
- * Copyright (C) 2024 moonleay
+ * Copyright (C) 2023 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,16 +16,15 @@
* along with this program. If not, see .
*/
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
+package net.moonleay.lilJudd.data.api.splatoon3ink.entry.schedule
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class TimePeriod(
- @SerialName("endTime")
+data class ModeData(
+ val startTime: String,
val endTime: String,
- @SerialName("startTime")
- val startTime: String
+ val matchType: String,
+ val map1: MapData?,
+ val map2: MapData?,
+ val ruleSetName: String,
+ val ruleSet: String,
+ val mode: String,
)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/FestNode.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/ShiftData.kt
similarity index 61%
rename from src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/FestNode.kt
rename to src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/ShiftData.kt
index e8a438d..f6f29f1 100644
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/FestNode.kt
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/ShiftData.kt
@@ -1,6 +1,6 @@
/*
* lilJudd
- * Copyright (C) 2024 moonleay
+ * Copyright (C) 2023 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,18 +16,19 @@
* along with this program. If not, see .
*/
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
+package net.moonleay.lilJudd.data.api.splatoon3ink.entry.schedule
+import io.ktor.http.*
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class FestNode(
- @SerialName("endTime")
+data class ShiftData(
+ val startTime: String,
val endTime: String,
- @SerialName("festMatchSettings")
- val festMatchSettings: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.FestMatchSettingX?,
- @SerialName("startTime")
- val startTime: String
+ val __splatoon3ink_king_salmonid_guess: String,
+ val __typename: String,
+ val stageName: String,
+ val image: Url,
+ val weapon1: WeaponData,
+ val weapon2: WeaponData,
+ val weapon3: WeaponData,
+ val weapon4: WeaponData,
)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/TimePeriodData.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/TimePeriodData.kt
new file mode 100644
index 0000000..dc66844
--- /dev/null
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/TimePeriodData.kt
@@ -0,0 +1,24 @@
+/*
+ * lilJudd
+ * Copyright (C) 2023 moonleay
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package net.moonleay.lilJudd.data.api.splatoon3ink.entry.schedule
+
+data class TimePeriodData(
+ val startTime: String,
+ val endTime: String,
+)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/UserIcon.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/WeaponData.kt
similarity index 72%
rename from src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/UserIcon.kt
rename to src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/WeaponData.kt
index 74ee2eb..025ef87 100644
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/UserIcon.kt
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/schedule/WeaponData.kt
@@ -1,6 +1,6 @@
/*
* lilJudd
- * Copyright (C) 2024 moonleay
+ * Copyright (C) 2023 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,14 +16,11 @@
* along with this program. If not, see .
*/
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
+package net.moonleay.lilJudd.data.api.splatoon3ink.entry.schedule
+import io.ktor.http.*
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class UserIcon(
- @SerialName("url")
- val url: String
+data class WeaponData(
+ val name: String,
+ val image: Url,
)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatfest/SplatfestColor.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatfest/SplatfestColor.kt
new file mode 100644
index 0000000..9f61bd7
--- /dev/null
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatfest/SplatfestColor.kt
@@ -0,0 +1,26 @@
+/*
+ * lilJudd
+ * Copyright (C) 2023 moonleay
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package net.moonleay.lilJudd.data.api.splatoon3ink.entry.splatfest
+
+data class SplatfestColor(
+ val a: Int,
+ val b: Double,
+ val g: Double,
+ val r: Double,
+)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Boss.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatfest/SplatfestData.kt
similarity index 65%
rename from src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Boss.kt
rename to src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatfest/SplatfestData.kt
index 1501727..fb11b19 100644
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Boss.kt
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatfest/SplatfestData.kt
@@ -1,6 +1,6 @@
/*
* lilJudd
- * Copyright (C) 2024 moonleay
+ * Copyright (C) 2023 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,16 +16,18 @@
* along with this program. If not, see .
*/
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
+package net.moonleay.lilJudd.data.api.splatoon3ink.entry.splatfest
+import io.ktor.http.*
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class Boss(
- @SerialName("id")
+data class SplatfestData(
val id: String,
- @SerialName("name")
- val name: String
+ val state: String,
+ val startTime: String,
+ val endTime: String,
+ val title: String,
+ val image: Url,
+ val team1: SplatfestTeamData,
+ val team2: SplatfestTeamData,
+ val team3: SplatfestTeamData,
)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatfest/SplatfestTeamData.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatfest/SplatfestTeamData.kt
new file mode 100644
index 0000000..b29ee85
--- /dev/null
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatfest/SplatfestTeamData.kt
@@ -0,0 +1,25 @@
+/*
+ * lilJudd
+ * Copyright (C) 2023 moonleay
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package net.moonleay.lilJudd.data.api.splatoon3ink.entry.splatfest
+
+data class SplatfestTeamData(
+ val teamName: String,
+ val color: SplatfestColor,
+ val results: SplatfestTeamResults?,
+)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Color.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatfest/SplatfestTeamResults.kt
similarity index 58%
rename from src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Color.kt
rename to src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatfest/SplatfestTeamResults.kt
index 7ed55be..ff7b531 100644
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Color.kt
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatfest/SplatfestTeamResults.kt
@@ -1,6 +1,6 @@
/*
* lilJudd
- * Copyright (C) 2024 moonleay
+ * Copyright (C) 2023 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,20 +16,18 @@
* along with this program. If not, see .
*/
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
+package net.moonleay.lilJudd.data.api.splatoon3ink.entry.splatfest
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class Color(
- @SerialName("a")
- val a: Int,
- @SerialName("b")
- val b: Double,
- @SerialName("g")
- val g: Double,
- @SerialName("r")
- val r: Double
+data class SplatfestTeamResults(
+ val isWinner: Boolean,
+ val horagaiRatio: Double,
+ val horagaiRatioTop: Boolean,
+ val voteRatio: Double,
+ val voteRatioTop: Boolean,
+ val regularRatio: Double,
+ val regularRatioTop: Boolean,
+ val challengeRatio: Double,
+ val challengeRatioTop: Boolean,
+ val tricolorRatio: Double,
+ val tricolorRatioTop: Boolean,
)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/OriginalImage.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatnet/BrandData.kt
similarity index 72%
rename from src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/OriginalImage.kt
rename to src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatnet/BrandData.kt
index e294963..2c80240 100644
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/OriginalImage.kt
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatnet/BrandData.kt
@@ -1,6 +1,6 @@
/*
* lilJudd
- * Copyright (C) 2024 moonleay
+ * Copyright (C) 2023 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,14 +16,13 @@
* along with this program. If not, see .
*/
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
+package net.moonleay.lilJudd.data.api.splatoon3ink.entry.splatnet
+import io.ktor.http.*
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class OriginalImage(
- @SerialName("url")
- val url: String
+data class BrandData(
+ val name: String,
+ val image: Url,
+ val usualGearPower: GearAbilityData?,
+ val saleEndTime: String?,
)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/ThumbnailImage.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatnet/GearAbilityData.kt
similarity index 72%
rename from src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/ThumbnailImage.kt
rename to src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatnet/GearAbilityData.kt
index cb357a9..81f2ee7 100644
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/ThumbnailImage.kt
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatnet/GearAbilityData.kt
@@ -1,6 +1,6 @@
/*
* lilJudd
- * Copyright (C) 2024 moonleay
+ * Copyright (C) 2023 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,14 +16,12 @@
* along with this program. If not, see .
*/
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
+package net.moonleay.lilJudd.data.api.splatoon3ink.entry.splatnet
+import io.ktor.http.*
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class ThumbnailImage(
- @SerialName("url")
- val url: String
+data class GearAbilityData(
+ val name: String,
+ val description: String?,
+ val image: Url,
)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/VsRule.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatnet/SplatnetItemData.kt
similarity index 65%
rename from src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/VsRule.kt
rename to src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatnet/SplatnetItemData.kt
index 5e47251..72268dd 100644
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/VsRule.kt
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/entry/splatnet/SplatnetItemData.kt
@@ -1,6 +1,6 @@
/*
* lilJudd
- * Copyright (C) 2024 moonleay
+ * Copyright (C) 2023 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,18 +16,17 @@
* along with this program. If not, see .
*/
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
+package net.moonleay.lilJudd.data.api.splatoon3ink.entry.splatnet
+import io.ktor.http.*
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class VsRule(
- @SerialName("id")
- val id: String,
- @SerialName("name")
+data class SplatnetItemData(
+ val saleEndTime: String,
+ val price: Int,
+ val typeName: String,
val name: String,
- @SerialName("rule")
- val rule: String
+ val primaryGearPower: GearAbilityData,
+ val additionalGearPowers: List,
+ val image: Url,
+ val brand: BrandData,
)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/BankaraMatchSetting.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/BankaraMatchSetting.kt
deleted file mode 100644
index a73a448..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/BankaraMatchSetting.kt
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class BankaraMatchSetting(
- @SerialName("bankaraMode")
- val bankaraMode: String,
- @SerialName("__isVsSetting")
- val isVsSetting: String,
- @SerialName("__typename")
- val typename: String,
- @SerialName("vsRule")
- val vsRule: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.VsRule,
- @SerialName("vsStages")
- val vsStages: List
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/BankaraNode.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/BankaraNode.kt
deleted file mode 100644
index e40379c..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/BankaraNode.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class BankaraNode(
- @SerialName("bankaraMatchSettings")
- val bankaraMatchSettings: List?,
- @SerialName("endTime")
- val endTime: String,
- @SerialName("festMatchSettings")
- val festMatchSettings: List?,
- @SerialName("startTime")
- val startTime: String
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/BankaraSchedules.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/BankaraSchedules.kt
deleted file mode 100644
index 0363b5f..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/BankaraSchedules.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class BankaraSchedules(
- @SerialName("nodes")
- val nodes: List
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/BigRunScheduleNode.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/BigRunScheduleNode.kt
deleted file mode 100644
index e51551e..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/BigRunScheduleNode.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class BigRunScheduleNode(
- @SerialName("endTime")
- val endTime: String,
- @SerialName("setting")
- val setting: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.Setting,
- @SerialName("__splatoon3ink_king_salmonid_guess")
- val splatoon3inkKingSalmonidGuess: String,
- @SerialName("startTime")
- val startTime: String
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/BigRunSchedules.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/BigRunSchedules.kt
deleted file mode 100644
index de77938..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/BigRunSchedules.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class BigRunSchedules(
- @SerialName("nodes")
- val nodes: List
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/CoopGroupingSchedule.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/CoopGroupingSchedule.kt
deleted file mode 100644
index baefdf1..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/CoopGroupingSchedule.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class CoopGroupingSchedule(
- @SerialName("bannerImage")
- val bannerImage: String?, // is null
- @SerialName("bigRunSchedules")
- val bigRunSchedules: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.BigRunSchedules,
- @SerialName("regularSchedules")
- val regularSchedules: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.RegularSchedules,
- @SerialName("teamContestSchedules")
- val teamContestSchedules: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.TeamContestSchedules?
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/CoopStage.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/CoopStage.kt
deleted file mode 100644
index ddfb9da..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/CoopStage.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class CoopStage(
- @SerialName("id")
- val id: String,
- @SerialName("image")
- val image: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.Image,
- @SerialName("name")
- val name: String,
- @SerialName("thumbnailImage")
- val thumbnailImage: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.ThumbnailImage
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/CurrentFest.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/CurrentFest.kt
deleted file mode 100644
index 63d995e..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/CurrentFest.kt
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class CurrentFest(
- @SerialName("endTime")
- val endTime: String,
- @SerialName("id")
- val id: String,
- @SerialName("midtermTime")
- val midtermTime: String,
- @SerialName("startTime")
- val startTime: String,
- @SerialName("state")
- val state: String,
- @SerialName("teams")
- val teams: List,
- @SerialName("title")
- val title: String,
- @SerialName("tricolorStage")
- val tricolorStage: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.TricolorStage
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/EventNode.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/EventNode.kt
deleted file mode 100644
index 7b7f011..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/EventNode.kt
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class EventNode(
- @SerialName("leagueMatchSetting")
- val leagueMatchSetting: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.LeagueMatchSetting,
- @SerialName("timePeriods")
- val timePeriods: List
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/EventSchedules.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/EventSchedules.kt
deleted file mode 100644
index f5f3fe3..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/EventSchedules.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class EventSchedules(
- @SerialName("nodes")
- val nodes: List
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/FestMatchSettingX.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/FestMatchSettingX.kt
deleted file mode 100644
index c759a30..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/FestMatchSettingX.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class FestMatchSettingX(
- @SerialName("__isVsSetting")
- val isVsSetting: String,
- @SerialName("__typename")
- val typename: String,
- @SerialName("vsRule")
- val vsRule: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.VsRule,
- @SerialName("vsStages")
- val vsStages: List
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/FestMatchSettingXX.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/FestMatchSettingXX.kt
deleted file mode 100644
index a1f5d3d..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/FestMatchSettingXX.kt
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class FestMatchSettingXX(
- @SerialName("__typename")
- val typename: String
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/FestSchedules.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/FestSchedules.kt
deleted file mode 100644
index 8eed590..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/FestSchedules.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class FestSchedules(
- @SerialName("nodes")
- val nodes: List
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/LeagueMatchSetting.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/LeagueMatchSetting.kt
deleted file mode 100644
index c8e4ba1..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/LeagueMatchSetting.kt
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class LeagueMatchSetting(
- @SerialName("__isVsSetting")
- val isVsSetting: String,
- @SerialName("leagueMatchEvent")
- val leagueMatchEvent: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.LeagueMatchEvent,
- @SerialName("__typename")
- val typename: String,
- @SerialName("vsRule")
- val vsRule: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.VsRule,
- @SerialName("vsStages")
- val vsStages: List
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/MapNode.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/MapNode.kt
deleted file mode 100644
index 107545f..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/MapNode.kt
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class MapNode(
- @SerialName("id")
- val id: String,
- @SerialName("name")
- val name: String,
- @SerialName("originalImage")
- val originalImage: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.OriginalImage,
- @SerialName("stats")
- val stats: String?, // is null
- @SerialName("vsStageId")
- val vsStageId: Int
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/RegularMatchSetting.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/RegularMatchSetting.kt
deleted file mode 100644
index ffb1d51..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/RegularMatchSetting.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class RegularMatchSetting(
- @SerialName("__isVsSetting")
- val isVsSetting: String,
- @SerialName("__typename")
- val typename: String,
- @SerialName("vsRule")
- val vsRule: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.VsRule,
- @SerialName("vsStages")
- val vsStages: List
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/RegularNode.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/RegularNode.kt
deleted file mode 100644
index 48d08fa..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/RegularNode.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class RegularNode(
- @SerialName("endTime")
- val endTime: String,
- @SerialName("festMatchSettings")
- val festMatchSettings: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.FestMatchSettingXX?,
- @SerialName("regularMatchSetting")
- val regularMatchSetting: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.RegularMatchSetting,
- @SerialName("startTime")
- val startTime: String
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/RegularSchedules.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/RegularSchedules.kt
deleted file mode 100644
index 6dc058f..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/RegularSchedules.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class RegularSchedules(
- @SerialName("nodes")
- val nodes: List
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/RegularSchedulesX.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/RegularSchedulesX.kt
deleted file mode 100644
index 6995bf3..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/RegularSchedulesX.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class RegularSchedulesX(
- @SerialName("nodes")
- val nodes: List
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Schedules.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Schedules.kt
deleted file mode 100644
index 2d058c6..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Schedules.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class Schedules(
- @SerialName("data")
- val data: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.SchedulesData
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/SchedulesData.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/SchedulesData.kt
deleted file mode 100644
index 9dd136b..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/SchedulesData.kt
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class SchedulesData(
- @SerialName("bankaraSchedules")
- val bankaraSchedules: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.BankaraSchedules,
- @SerialName("coopGroupingSchedule")
- val coopGroupingSchedule: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.CoopGroupingSchedule,
- @SerialName("currentFest")
- val currentFest: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.CurrentFest?,
- @SerialName("currentPlayer")
- val currentPlayer: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.CurrentPlayer,
- @SerialName("eventSchedules")
- val eventSchedules: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.EventSchedules,
- @SerialName("festSchedules")
- val festSchedules: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.FestSchedules,
- @SerialName("regularSchedules")
- val regularSchedules: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.RegularSchedulesX,
- @SerialName("vsStages")
- val vsStages: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.VsStages,
- @SerialName("xSchedules")
- val xSchedules: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.XSchedules
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Setting.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Setting.kt
deleted file mode 100644
index ef98cfa..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Setting.kt
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class Setting(
- @SerialName("boss")
- val boss: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.Boss,
- @SerialName("coopStage")
- val coopStage: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.CoopStage,
- @SerialName("__isCoopSetting")
- val isCoopSetting: String,
- @SerialName("__typename")
- val typename: String,
- @SerialName("weapons")
- val weapons: List
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Team.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Team.kt
deleted file mode 100644
index f015188..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Team.kt
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class Team(
- @SerialName("color")
- val color: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.Color,
- @SerialName("id")
- val id: String,
-// @SerialName("myVoteState")
-// val myVoteState: Any?
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/TeamContestSchedules.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/TeamContestSchedules.kt
deleted file mode 100644
index e328191..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/TeamContestSchedules.kt
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-// TODO: Please check what goes here.
-data class TeamContestSchedules(
- @SerialName("nodes")
- val nodes: List // This is a placeholder.
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/TricolorStage.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/TricolorStage.kt
deleted file mode 100644
index 958d1a5..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/TricolorStage.kt
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class TricolorStage(
- @SerialName("id")
- val id: String,
- @SerialName("image")
- val image: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.Image,
- @SerialName("name")
- val name: String
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/VsStage.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/VsStage.kt
deleted file mode 100644
index 9d9ecb3..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/VsStage.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class VsStage(
- @SerialName("id")
- val id: String,
- @SerialName("image")
- val image: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.Image,
- @SerialName("name")
- val name: String,
- @SerialName("vsStageId")
- val vsStageId: Int
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/VsStages.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/VsStages.kt
deleted file mode 100644
index 21d32f1..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/VsStages.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class VsStages(
- @SerialName("nodes")
- val nodes: List
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Weapon.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Weapon.kt
deleted file mode 100644
index 9b47a82..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/Weapon.kt
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class Weapon(
- @SerialName("image")
- val image: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.Image,
- @SerialName("name")
- val name: String,
- @SerialName("__splatoon3ink_id")
- val splatoon3inkId: String
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/XMatchSetting.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/XMatchSetting.kt
deleted file mode 100644
index 7467db1..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/XMatchSetting.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class XMatchSetting(
- @SerialName("__isVsSetting")
- val isVsSetting: String,
- @SerialName("__typename")
- val typename: String,
- @SerialName("vsRule")
- val vsRule: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.VsRule,
- @SerialName("vsStages")
- val vsStages: List
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/XNode.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/XNode.kt
deleted file mode 100644
index 1a55bc5..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/XNode.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class XNode(
- @SerialName("endTime")
- val endTime: String,
- @SerialName("festMatchSettings")
- val festMatchSettings: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.FestMatchSettingXX?,
- @SerialName("startTime")
- val startTime: String,
- @SerialName("xMatchSetting")
- val xMatchSetting: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.XMatchSetting
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/XSchedules.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/XSchedules.kt
deleted file mode 100644
index a3939c3..0000000
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/XSchedules.kt
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * lilJudd
- * Copyright (C) 2024 moonleay
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
-
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class XSchedules(
- @SerialName("nodes")
- val nodes: List
-)
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/type/ApiDataType.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/type/ApiDataType.kt
new file mode 100644
index 0000000..7cb7361
--- /dev/null
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/type/ApiDataType.kt
@@ -0,0 +1,27 @@
+/*
+ * lilJudd
+ * Copyright (C) 2023 moonleay
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package net.moonleay.lilJudd.data.api.splatoon3ink.type
+
+enum class ApiDataType {
+ SCHEDULES,
+ SPLATNETGEAR,
+ COOP,
+ SPLATFESTS,
+ ALL
+}
diff --git a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/CurrentPlayer.kt b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/type/ApiRequestType.kt
similarity index 65%
rename from src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/CurrentPlayer.kt
rename to src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/type/ApiRequestType.kt
index 3bab50b..03a9add 100644
--- a/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/schedules/CurrentPlayer.kt
+++ b/src/main/kotlin/net/moonleay/lilJudd/data/api/splatoon3ink/type/ApiRequestType.kt
@@ -1,6 +1,6 @@
/*
* lilJudd
- * Copyright (C) 2024 moonleay
+ * Copyright (C) 2023 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,14 +16,11 @@
* along with this program. If not, see .
*/
-package net.moonleay.lilJudd.data.api.splatoon3ink.schedules
+package net.moonleay.lilJudd.data.api.splatoon3ink.type
-
-import kotlinx.serialization.SerialName
-import kotlinx.serialization.Serializable
-
-@Serializable
-data class CurrentPlayer(
- @SerialName("userIcon")
- val userIcon: net.moonleay.lilJudd.data.api.splatoon3ink.schedules.UserIcon
-)
+enum class ApiRequestType(val nameToDisplay: String) {
+ AUTOMATIC_CACHE_UPDATE("automatic request to update the cache"),
+ AUTOMATIC_CACHE_CREATION_AT_STARTUP("automatic request to create cache at startup"),
+ MANUAL("manual request"),
+ DEBUG("debug request")
+}
diff --git a/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiFestivalAndCoopUpdateScheduler.kt b/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiFestivalAndCoopUpdateScheduler.kt
new file mode 100644
index 0000000..07f4a4b
--- /dev/null
+++ b/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiFestivalAndCoopUpdateScheduler.kt
@@ -0,0 +1,50 @@
+/*
+ * lilJudd
+ * Copyright (C) 2024 moonleay
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package net.moonleay.lilJudd.jobs
+
+import dev.inmo.krontab.KronScheduler
+import kotlinx.coroutines.Job
+import net.moonleay.lilJudd.data.api.splatoon3ink.Splatoon3ApiCache
+import net.moonleay.lilJudd.data.api.splatoon3ink.type.ApiDataType
+import net.moonleay.lilJudd.data.api.splatoon3ink.type.ApiRequestType
+import net.moonleay.lilJudd.jobs.component.CronjobType
+import net.moonleay.lilJudd.jobs.component.ICronjob
+import net.moonleay.lilJudd.util.Logger
+
+object Splatoon3ApiFestivalAndCoopUpdateScheduler : ICronjob {
+ override val jobName: String
+ get() = "Splatoon3ApiFestivalAndCoopUpdateScheduler"
+ override val jobIncoming: String
+ get() = "0 0 0 /1 * * 0o *" // once a day
+ override val jobType: CronjobType
+ get() = CronjobType.INFINITE
+ override val continueJob: Boolean
+ get() = true
+ override lateinit var cronjobJob: Job
+ override lateinit var scheduler: KronScheduler
+
+ override suspend fun jobFunction() {
+ Logger.out("Running Splatoon3ApiFestivalUpdateScheduler.")
+ Splatoon3ApiCache.updateData(ApiDataType.SPLATFESTS, ApiRequestType.AUTOMATIC_CACHE_UPDATE)
+ Logger.out("Splatoon3ApiFestivalUpdateScheduler finished.")
+ Logger.out("Running Splatoon3ApiCoopUpdateScheduler.")
+ Splatoon3ApiCache.updateData(ApiDataType.COOP, ApiRequestType.AUTOMATIC_CACHE_UPDATE)
+ Logger.out("Splatoon3ApiCoopUpdateScheduler finished.")
+ }
+}
diff --git a/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiScheduleUpdateScheduler.kt b/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiScheduleUpdateScheduler.kt
index 6ec76f9..2a47939 100644
--- a/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiScheduleUpdateScheduler.kt
+++ b/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiScheduleUpdateScheduler.kt
@@ -20,7 +20,9 @@ package net.moonleay.lilJudd.jobs
import dev.inmo.krontab.KronScheduler
import kotlinx.coroutines.Job
-import net.moonleay.lilJudd.data.api.splatoon3ink.Splatoon3Api
+import net.moonleay.lilJudd.data.api.splatoon3ink.Splatoon3ApiCache
+import net.moonleay.lilJudd.data.api.splatoon3ink.type.ApiDataType
+import net.moonleay.lilJudd.data.api.splatoon3ink.type.ApiRequestType
import net.moonleay.lilJudd.jobs.component.CronjobType
import net.moonleay.lilJudd.jobs.component.ICronjob
import net.moonleay.lilJudd.util.Logger
@@ -38,8 +40,8 @@ object Splatoon3ApiScheduleUpdateScheduler : ICronjob {
override lateinit var scheduler: KronScheduler
override suspend fun jobFunction() {
- Logger.out("Updating Schedules...")
- Splatoon3Api.updateSchedule()
- Logger.out("Updating finished.")
+ Logger.out("Running Splatoon3ApiScheduleUpdateScheduler.")
+ Splatoon3ApiCache.updateData(ApiDataType.SCHEDULES, ApiRequestType.AUTOMATIC_CACHE_UPDATE)
+ Logger.out("Splatoon3ApiScheduleUpdateScheduler finished.")
}
}
diff --git a/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiSplatnetGearUpdateScheduler.kt b/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiSplatnetGearUpdateScheduler.kt
new file mode 100644
index 0000000..7bbc020
--- /dev/null
+++ b/src/main/kotlin/net/moonleay/lilJudd/jobs/Splatoon3ApiSplatnetGearUpdateScheduler.kt
@@ -0,0 +1,47 @@
+/*
+ * lilJudd
+ * Copyright (C) 2024 moonleay
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package net.moonleay.lilJudd.jobs
+
+import dev.inmo.krontab.KronScheduler
+import kotlinx.coroutines.Job
+import net.moonleay.lilJudd.data.api.splatoon3ink.Splatoon3ApiCache
+import net.moonleay.lilJudd.data.api.splatoon3ink.type.ApiDataType
+import net.moonleay.lilJudd.data.api.splatoon3ink.type.ApiRequestType
+import net.moonleay.lilJudd.jobs.component.CronjobType
+import net.moonleay.lilJudd.jobs.component.ICronjob
+import net.moonleay.lilJudd.util.Logger
+
+object Splatoon3ApiSplatnetGearUpdateScheduler : ICronjob {
+ override val jobName: String
+ get() = "Splatoon3ApiSplatnetGearUpdateScheduler"
+ override val jobIncoming: String
+ get() = "0 0 /6 * * * 0o *" //Every 6 hours
+ override val jobType: CronjobType
+ get() = CronjobType.INFINITE
+ override val continueJob: Boolean
+ get() = true
+ override lateinit var cronjobJob: Job
+ override lateinit var scheduler: KronScheduler
+
+ override suspend fun jobFunction() {
+ Logger.out("Running Splatoon3ApiSplatnetGearUpdateScheduler.")
+ Splatoon3ApiCache.updateData(ApiDataType.SPLATNETGEAR, ApiRequestType.AUTOMATIC_CACHE_UPDATE)
+ Logger.out("Splatoon3ApiSplatnetGearUpdateScheduler finished.")
+ }
+}
diff --git a/src/main/kotlin/net/moonleay/lilJudd/jobs/StatusUpdater.kt b/src/main/kotlin/net/moonleay/lilJudd/jobs/StatusUpdater.kt
index 4aa8fb3..762b498 100644
--- a/src/main/kotlin/net/moonleay/lilJudd/jobs/StatusUpdater.kt
+++ b/src/main/kotlin/net/moonleay/lilJudd/jobs/StatusUpdater.kt
@@ -1,6 +1,6 @@
/*
* lilJudd
- * Copyright (C) 2024 moonleay
+ * Copyright (C) 2023 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ import dev.inmo.krontab.KronScheduler
import dev.kord.common.entity.PresenceStatus
import kotlinx.coroutines.Job
import net.moonleay.lilJudd.Bot
-import net.moonleay.lilJudd.data.api.splatoon3ink.Splatoon3ApiDataGrabber
+import net.moonleay.lilJudd.data.api.Splatoon3Api
import net.moonleay.lilJudd.jobs.component.CronjobType
import net.moonleay.lilJudd.jobs.component.ICronjob
@@ -56,11 +56,11 @@ object StatusUpdater : ICronjob {
private fun refreshStatusList(timestamp: Long) {
statusList = listOf(
- Splatoon3ApiDataGrabber.getRotationTime(timestamp),
- Splatoon3ApiDataGrabber.getRegularMapsFormatted(timestamp),
- Splatoon3ApiDataGrabber.getOpenMapFormatted(timestamp),
- Splatoon3ApiDataGrabber.getSeriesMapsFormatted(timestamp),
- Splatoon3ApiDataGrabber.getXMapFormatted(timestamp)
+ Splatoon3Api.getRotationTime(timestamp),
+ Splatoon3Api.getRegularMapsFormatted(timestamp),
+ Splatoon3Api.getOpenMapFormatted(timestamp),
+ Splatoon3Api.getSeriesMapsFormatted(timestamp),
+ Splatoon3Api.getXMapFormatted(timestamp)
)
}
}
diff --git a/src/main/templates/net/moonleay/lilJudd/build/BuildConstants.kt b/src/main/templates/net/moonleay/lilJudd/build/BuildConstants.kt
index 44c46b3..d75d861 100644
--- a/src/main/templates/net/moonleay/lilJudd/build/BuildConstants.kt
+++ b/src/main/templates/net/moonleay/lilJudd/build/BuildConstants.kt
@@ -1,6 +1,6 @@
/*
* lilJudd
- * Copyright (C) 2024 moonleay
+ * Copyright (C) 2023 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,5 +27,4 @@ internal object BuildConstants {
const val exposedVersion = "${exposedversion}"
const val postgresVersion = "${postgresversion}"
const val krontabVersion = "${krontabversion}"
- const val kotlinXSerializationVerson = "${kotlinxserializationversion}"
}