Skip to content

Commit

Permalink
Rename several data objects to signify usages
Browse files Browse the repository at this point in the history
  • Loading branch information
Deftu committed Sep 14, 2024
1 parent 70c0f8a commit 396070a
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public data class Beatmap(
// Optionals
public val beatmapset: Beatmapset?,
public val checksum: String?,
public val failtimes: Failtimes?,
public val failtimes: BeatmapFailtimes?,
public val maxCombo: Int?,

// Extended
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package one.devos.osuv2kt.models.beatmap

public data class Failtimes(
public data class BeatmapFailtimes(
val exit: IntArray?,
val fail: IntArray?
) {
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false

other as Failtimes
other as BeatmapFailtimes

if (exit != null) {
if (other.exit == null) return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public data class Beatmapset(
// Optionals
public val beatmaps: Array<Beatmap>,
public val converts: Any?,
public val currentNominations: Array<Nomination>?,
public val currentNominations: Array<BeatmapsetNomination>?,
public val currentUserAttributes: Any?,
public val description: Any?,
public val discussions: Any?,
Expand All @@ -41,16 +41,16 @@ public data class Beatmapset(
public val trackId: Int?,

// Extended
public val availability: Availability,
public val availability: BeatmapsetAvailability,
public val bpm: Float?,
public val canBeHyped: Boolean?,
public val deletedAt: OffsetDateTime?,
public val discussionLocked: Boolean?,
public val hype: Hype,
public val hype: BeatmapsetHype,
public val isScoreable: Boolean?,
public val lastUpdated: OffsetDateTime?,
public val legacyThreadUrl: String?,
public val nominationsSummary: NominationsSummary,
public val nominationsSummary: BeatmapsetNominationsSummary,
public val ranked: Int?,
public val rankedDate: OffsetDateTime?,
public val storyboard: Boolean?,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package one.devos.osuv2kt.models.beatmap

public data class Availability(
public data class BeatmapsetAvailability(
public val downloadDisabled: Boolean,
public val moreInformation: String?
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package one.devos.osuv2kt.models.beatmap

public data class Hype(
public data class BeatmapsetHype(
public val current: Int,
public val required: Int
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package one.devos.osuv2kt.models.beatmap

import one.devos.osuv2kt.models.Ruleset

public data class Nomination(
public data class BeatmapsetNomination(
val beatmapsetId: Int,
val rulesets: Array<Ruleset>,
val reset: Boolean,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package one.devos.osuv2kt.models.beatmap

public data class NominationsSummary(
public data class BeatmapsetNominationsSummary(
public val current: Int,
public val required: Int,
)
6 changes: 3 additions & 3 deletions src/main/kotlin/one/devos/osuv2kt/models/user/User.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ public data class User(
public val isOnline: Boolean,
public val isRestricted: Boolean,
public val isSupporter: Boolean,
public val kudosu: Kudosu,
public val kudosu: UserKudosu,
public val lastVisit: OffsetDateTime,
public val pmFriendsOnly: Boolean,
public val profileColour: Color?,
public val username: String,

// Optionals
public val accountHistory: Array<UserAccountHistory>?,
public val activeTournamentBanners: Array<ProfileBanner>?,
public val activeTournamentBanners: Array<UserProfileBanner>?,
public val badges: Array<UserBadge>?,
public val beatmapPlaycountsCount: Int?,
public val blocks: Any?,
Expand All @@ -41,7 +41,7 @@ public data class User(
public val page: Any?,
public val pendingBeatmapsetCount: Any?,
public val previousUsernames: Any?,
public val rankHighest: RankHighest?,
public val rankHighest: UserRankHighest?,
public val rankHistory: Any?,
public val rankedBeatmapsetCount: Any?,
public val replaysWatchedCounts: Any?,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package one.devos.osuv2kt.models.user

public data class GradeCounts(
public data class UserGradeCounts(
val a: Int,
val s: Int,
val sh: Int,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package one.devos.osuv2kt.models.user

public data class Kudosu(
public data class UserKudosu(
public val available: Int,
public val total: Int
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package one.devos.osuv2kt.models.user

public data class Level(
public data class UserLevel(
public val current: Int,
public val progress: Float
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package one.devos.osuv2kt.models.user

import com.google.gson.annotations.SerializedName

public data class ProfileBanner(
public data class UserProfileBanner(
public val id: Int,
public val tournamentId: Int,
public val image: String?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package one.devos.osuv2kt.models.user

import java.time.OffsetDateTime

public data class RankHighest(
public data class UserRankHighest(
public val rank: Int,
public val updatedAt: OffsetDateTime
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ public data class UserStatistics(
public val count50: Int,
public val countMiss: Int,
public val countryRank: Int?,
public val gradeCounts: GradeCounts,
public val gradeCounts: UserGradeCounts,
public val hitAccuracy: Float,
public val isRanked: Boolean,
public val level: Level,
public val level: UserLevel,
public val maximumCombo: Int,
public val playCount: Int,
public val playTime: Int,
Expand Down

0 comments on commit 396070a

Please sign in to comment.