From 70c0f8a5dd2af04d1c850f933604b2c6be7adb2f Mon Sep 17 00:00:00 2001 From: Deftu Date: Sat, 14 Sep 2024 19:42:25 +0200 Subject: [PATCH] Move data objects to their appropriate packages --- src/main/kotlin/one/devos/osuv2kt/models/Scope.kt | 2 +- .../one/devos/osuv2kt/models/{ => beatmap}/Availability.kt | 2 +- src/main/kotlin/one/devos/osuv2kt/models/beatmap/Beatmap.kt | 1 - .../kotlin/one/devos/osuv2kt/models/beatmap/Beatmapset.kt | 4 ---- .../one/devos/osuv2kt/models/{ => beatmap}/Failtimes.kt | 2 +- .../kotlin/one/devos/osuv2kt/models/{ => beatmap}/Hype.kt | 2 +- .../one/devos/osuv2kt/models/{ => beatmap}/Nomination.kt | 4 +++- .../devos/osuv2kt/models/{ => beatmap}/NominationsSummary.kt | 2 +- .../osuv2kt/models/{ => score}/MultiplayerScoresAround.kt | 2 +- src/main/kotlin/one/devos/osuv2kt/models/score/Score.kt | 1 - .../kotlin/one/devos/osuv2kt/models/{ => user}/GradeCounts.kt | 2 +- src/main/kotlin/one/devos/osuv2kt/models/{ => user}/Kudosu.kt | 2 +- src/main/kotlin/one/devos/osuv2kt/models/{ => user}/Level.kt | 2 +- .../one/devos/osuv2kt/models/{ => user}/ProfileBanner.kt | 2 +- .../kotlin/one/devos/osuv2kt/models/{ => user}/RankHighest.kt | 2 +- src/main/kotlin/one/devos/osuv2kt/models/user/User.kt | 4 +--- .../one/devos/osuv2kt/models/{ => user}/UserAccountHistory.kt | 2 +- .../devos/osuv2kt/models/{ => user}/UserAccountHistoryType.kt | 2 +- .../kotlin/one/devos/osuv2kt/models/{ => user}/UserBadge.kt | 2 +- .../kotlin/one/devos/osuv2kt/models/{ => user}/UserGroup.kt | 2 +- .../kotlin/one/devos/osuv2kt/models/user/UserStatistics.kt | 3 --- 21 files changed, 19 insertions(+), 28 deletions(-) rename src/main/kotlin/one/devos/osuv2kt/models/{ => beatmap}/Availability.kt (74%) rename src/main/kotlin/one/devos/osuv2kt/models/{ => beatmap}/Failtimes.kt (95%) rename src/main/kotlin/one/devos/osuv2kt/models/{ => beatmap}/Hype.kt (67%) rename src/main/kotlin/one/devos/osuv2kt/models/{ => beatmap}/Nomination.kt (62%) rename src/main/kotlin/one/devos/osuv2kt/models/{ => beatmap}/NominationsSummary.kt (70%) rename src/main/kotlin/one/devos/osuv2kt/models/{ => score}/MultiplayerScoresAround.kt (63%) rename src/main/kotlin/one/devos/osuv2kt/models/{ => user}/GradeCounts.kt (75%) rename src/main/kotlin/one/devos/osuv2kt/models/{ => user}/Kudosu.kt (69%) rename src/main/kotlin/one/devos/osuv2kt/models/{ => user}/Level.kt (69%) rename src/main/kotlin/one/devos/osuv2kt/models/{ => user}/ProfileBanner.kt (86%) rename src/main/kotlin/one/devos/osuv2kt/models/{ => user}/RankHighest.kt (77%) rename src/main/kotlin/one/devos/osuv2kt/models/{ => user}/UserAccountHistory.kt (88%) rename src/main/kotlin/one/devos/osuv2kt/models/{ => user}/UserAccountHistoryType.kt (69%) rename src/main/kotlin/one/devos/osuv2kt/models/{ => user}/UserBadge.kt (89%) rename src/main/kotlin/one/devos/osuv2kt/models/{ => user}/UserGroup.kt (67%) diff --git a/src/main/kotlin/one/devos/osuv2kt/models/Scope.kt b/src/main/kotlin/one/devos/osuv2kt/models/Scope.kt index b5cd909..06c295a 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/Scope.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/Scope.kt @@ -1,6 +1,6 @@ package one.devos.osuv2kt.models -public enum class Scope(public val value: String) { +public enum class Scope(private val value: String) { READ_CHAT("chat.read"), WRITE_CHAT("chat.write"), diff --git a/src/main/kotlin/one/devos/osuv2kt/models/Availability.kt b/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Availability.kt similarity index 74% rename from src/main/kotlin/one/devos/osuv2kt/models/Availability.kt rename to src/main/kotlin/one/devos/osuv2kt/models/beatmap/Availability.kt index 0204a34..5a8446e 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/Availability.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Availability.kt @@ -1,4 +1,4 @@ -package one.devos.osuv2kt.models +package one.devos.osuv2kt.models.beatmap public data class Availability( public val downloadDisabled: Boolean, diff --git a/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Beatmap.kt b/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Beatmap.kt index dc917a2..a7c579d 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Beatmap.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Beatmap.kt @@ -1,6 +1,5 @@ package one.devos.osuv2kt.models.beatmap -import one.devos.osuv2kt.models.Failtimes import one.devos.osuv2kt.models.RankStatus import one.devos.osuv2kt.models.Ruleset import java.time.OffsetDateTime diff --git a/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Beatmapset.kt b/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Beatmapset.kt index dc28b48..5b2e3c0 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Beatmapset.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Beatmapset.kt @@ -1,9 +1,5 @@ package one.devos.osuv2kt.models.beatmap -import one.devos.osuv2kt.models.Availability -import one.devos.osuv2kt.models.Hype -import one.devos.osuv2kt.models.Nomination -import one.devos.osuv2kt.models.NominationsSummary import java.time.OffsetDateTime public data class Beatmapset( diff --git a/src/main/kotlin/one/devos/osuv2kt/models/Failtimes.kt b/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Failtimes.kt similarity index 95% rename from src/main/kotlin/one/devos/osuv2kt/models/Failtimes.kt rename to src/main/kotlin/one/devos/osuv2kt/models/beatmap/Failtimes.kt index f658466..f5e1e1e 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/Failtimes.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Failtimes.kt @@ -1,4 +1,4 @@ -package one.devos.osuv2kt.models +package one.devos.osuv2kt.models.beatmap public data class Failtimes( val exit: IntArray?, diff --git a/src/main/kotlin/one/devos/osuv2kt/models/Hype.kt b/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Hype.kt similarity index 67% rename from src/main/kotlin/one/devos/osuv2kt/models/Hype.kt rename to src/main/kotlin/one/devos/osuv2kt/models/beatmap/Hype.kt index dbf1de7..b0668e1 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/Hype.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Hype.kt @@ -1,4 +1,4 @@ -package one.devos.osuv2kt.models +package one.devos.osuv2kt.models.beatmap public data class Hype( public val current: Int, diff --git a/src/main/kotlin/one/devos/osuv2kt/models/Nomination.kt b/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Nomination.kt similarity index 62% rename from src/main/kotlin/one/devos/osuv2kt/models/Nomination.kt rename to src/main/kotlin/one/devos/osuv2kt/models/beatmap/Nomination.kt index a3d9538..96f6187 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/Nomination.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/beatmap/Nomination.kt @@ -1,4 +1,6 @@ -package one.devos.osuv2kt.models +package one.devos.osuv2kt.models.beatmap + +import one.devos.osuv2kt.models.Ruleset public data class Nomination( val beatmapsetId: Int, diff --git a/src/main/kotlin/one/devos/osuv2kt/models/NominationsSummary.kt b/src/main/kotlin/one/devos/osuv2kt/models/beatmap/NominationsSummary.kt similarity index 70% rename from src/main/kotlin/one/devos/osuv2kt/models/NominationsSummary.kt rename to src/main/kotlin/one/devos/osuv2kt/models/beatmap/NominationsSummary.kt index 9466d5d..cbb3d65 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/NominationsSummary.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/beatmap/NominationsSummary.kt @@ -1,4 +1,4 @@ -package one.devos.osuv2kt.models +package one.devos.osuv2kt.models.beatmap public data class NominationsSummary( public val current: Int, diff --git a/src/main/kotlin/one/devos/osuv2kt/models/MultiplayerScoresAround.kt b/src/main/kotlin/one/devos/osuv2kt/models/score/MultiplayerScoresAround.kt similarity index 63% rename from src/main/kotlin/one/devos/osuv2kt/models/MultiplayerScoresAround.kt rename to src/main/kotlin/one/devos/osuv2kt/models/score/MultiplayerScoresAround.kt index 1676ac2..29abd12 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/MultiplayerScoresAround.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/score/MultiplayerScoresAround.kt @@ -1,4 +1,4 @@ -package one.devos.osuv2kt.models +package one.devos.osuv2kt.models.score public enum class MultiplayerScoresAround { HIGHER, diff --git a/src/main/kotlin/one/devos/osuv2kt/models/score/Score.kt b/src/main/kotlin/one/devos/osuv2kt/models/score/Score.kt index 688fef5..9b3ce21 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/score/Score.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/score/Score.kt @@ -1,6 +1,5 @@ package one.devos.osuv2kt.models.score -import one.devos.osuv2kt.models.MultiplayerScoresAround import java.time.OffsetDateTime public data class Score( diff --git a/src/main/kotlin/one/devos/osuv2kt/models/GradeCounts.kt b/src/main/kotlin/one/devos/osuv2kt/models/user/GradeCounts.kt similarity index 75% rename from src/main/kotlin/one/devos/osuv2kt/models/GradeCounts.kt rename to src/main/kotlin/one/devos/osuv2kt/models/user/GradeCounts.kt index 886a544..c5eedda 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/GradeCounts.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/user/GradeCounts.kt @@ -1,4 +1,4 @@ -package one.devos.osuv2kt.models +package one.devos.osuv2kt.models.user public data class GradeCounts( val a: Int, diff --git a/src/main/kotlin/one/devos/osuv2kt/models/Kudosu.kt b/src/main/kotlin/one/devos/osuv2kt/models/user/Kudosu.kt similarity index 69% rename from src/main/kotlin/one/devos/osuv2kt/models/Kudosu.kt rename to src/main/kotlin/one/devos/osuv2kt/models/user/Kudosu.kt index 915ce69..e72d98d 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/Kudosu.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/user/Kudosu.kt @@ -1,4 +1,4 @@ -package one.devos.osuv2kt.models +package one.devos.osuv2kt.models.user public data class Kudosu( public val available: Int, diff --git a/src/main/kotlin/one/devos/osuv2kt/models/Level.kt b/src/main/kotlin/one/devos/osuv2kt/models/user/Level.kt similarity index 69% rename from src/main/kotlin/one/devos/osuv2kt/models/Level.kt rename to src/main/kotlin/one/devos/osuv2kt/models/user/Level.kt index ff8bbdd..35aae50 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/Level.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/user/Level.kt @@ -1,4 +1,4 @@ -package one.devos.osuv2kt.models +package one.devos.osuv2kt.models.user public data class Level( public val current: Int, diff --git a/src/main/kotlin/one/devos/osuv2kt/models/ProfileBanner.kt b/src/main/kotlin/one/devos/osuv2kt/models/user/ProfileBanner.kt similarity index 86% rename from src/main/kotlin/one/devos/osuv2kt/models/ProfileBanner.kt rename to src/main/kotlin/one/devos/osuv2kt/models/user/ProfileBanner.kt index e998f64..c57761c 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/ProfileBanner.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/user/ProfileBanner.kt @@ -1,4 +1,4 @@ -package one.devos.osuv2kt.models +package one.devos.osuv2kt.models.user import com.google.gson.annotations.SerializedName diff --git a/src/main/kotlin/one/devos/osuv2kt/models/RankHighest.kt b/src/main/kotlin/one/devos/osuv2kt/models/user/RankHighest.kt similarity index 77% rename from src/main/kotlin/one/devos/osuv2kt/models/RankHighest.kt rename to src/main/kotlin/one/devos/osuv2kt/models/user/RankHighest.kt index 6828312..c9ff140 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/RankHighest.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/user/RankHighest.kt @@ -1,4 +1,4 @@ -package one.devos.osuv2kt.models +package one.devos.osuv2kt.models.user import java.time.OffsetDateTime diff --git a/src/main/kotlin/one/devos/osuv2kt/models/user/User.kt b/src/main/kotlin/one/devos/osuv2kt/models/user/User.kt index 5bb1eb3..467be50 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/user/User.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/user/User.kt @@ -1,6 +1,5 @@ package one.devos.osuv2kt.models.user -import com.google.gson.JsonObject import one.devos.osuv2kt.models.* import java.awt.Color import java.time.OffsetDateTime @@ -26,8 +25,7 @@ public data class User( // Optionals public val accountHistory: Array?, - // TODO: activeTournamentBanners - val activeTournamentBanners: Array?, + public val activeTournamentBanners: Array?, public val badges: Array?, public val beatmapPlaycountsCount: Int?, public val blocks: Any?, diff --git a/src/main/kotlin/one/devos/osuv2kt/models/UserAccountHistory.kt b/src/main/kotlin/one/devos/osuv2kt/models/user/UserAccountHistory.kt similarity index 88% rename from src/main/kotlin/one/devos/osuv2kt/models/UserAccountHistory.kt rename to src/main/kotlin/one/devos/osuv2kt/models/user/UserAccountHistory.kt index 652dd12..56bf513 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/UserAccountHistory.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/user/UserAccountHistory.kt @@ -1,4 +1,4 @@ -package one.devos.osuv2kt.models +package one.devos.osuv2kt.models.user import java.time.OffsetDateTime diff --git a/src/main/kotlin/one/devos/osuv2kt/models/UserAccountHistoryType.kt b/src/main/kotlin/one/devos/osuv2kt/models/user/UserAccountHistoryType.kt similarity index 69% rename from src/main/kotlin/one/devos/osuv2kt/models/UserAccountHistoryType.kt rename to src/main/kotlin/one/devos/osuv2kt/models/user/UserAccountHistoryType.kt index 9e910aa..9cf5b17 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/UserAccountHistoryType.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/user/UserAccountHistoryType.kt @@ -1,4 +1,4 @@ -package one.devos.osuv2kt.models +package one.devos.osuv2kt.models.user public enum class UserAccountHistoryType() { NOTE, diff --git a/src/main/kotlin/one/devos/osuv2kt/models/UserBadge.kt b/src/main/kotlin/one/devos/osuv2kt/models/user/UserBadge.kt similarity index 89% rename from src/main/kotlin/one/devos/osuv2kt/models/UserBadge.kt rename to src/main/kotlin/one/devos/osuv2kt/models/user/UserBadge.kt index 407fdac..2374520 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/UserBadge.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/user/UserBadge.kt @@ -1,4 +1,4 @@ -package one.devos.osuv2kt.models +package one.devos.osuv2kt.models.user import com.google.gson.annotations.SerializedName import java.time.OffsetDateTime diff --git a/src/main/kotlin/one/devos/osuv2kt/models/UserGroup.kt b/src/main/kotlin/one/devos/osuv2kt/models/user/UserGroup.kt similarity index 67% rename from src/main/kotlin/one/devos/osuv2kt/models/UserGroup.kt rename to src/main/kotlin/one/devos/osuv2kt/models/user/UserGroup.kt index 63efbdb..72f5c43 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/UserGroup.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/user/UserGroup.kt @@ -1,4 +1,4 @@ -package one.devos.osuv2kt.models +package one.devos.osuv2kt.models.user public data class UserGroup( public val playmodes: Array? = null diff --git a/src/main/kotlin/one/devos/osuv2kt/models/user/UserStatistics.kt b/src/main/kotlin/one/devos/osuv2kt/models/user/UserStatistics.kt index dc8f40d..9fe765a 100644 --- a/src/main/kotlin/one/devos/osuv2kt/models/user/UserStatistics.kt +++ b/src/main/kotlin/one/devos/osuv2kt/models/user/UserStatistics.kt @@ -1,8 +1,5 @@ package one.devos.osuv2kt.models.user -import one.devos.osuv2kt.models.GradeCounts -import one.devos.osuv2kt.models.Level - public data class UserStatistics( public val count100: Int, public val count300: Int,