Sync sansei branch #1
@ -205,6 +205,7 @@ class OsuApiModels {
|
|||||||
data class Beatmap(
|
data class Beatmap(
|
||||||
val beatmapset_id: Int,
|
val beatmapset_id: Int,
|
||||||
val difficulty_rating: Double?,
|
val difficulty_rating: Double?,
|
||||||
|
val checksum: String?,
|
||||||
val id: Int,
|
val id: Int,
|
||||||
val version: String?,
|
val version: String?,
|
||||||
val beatmapset: BeatmapSet,
|
val beatmapset: BeatmapSet,
|
||||||
@ -222,6 +223,7 @@ class OsuApiModels {
|
|||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class BeatmapSet(
|
data class BeatmapSet(
|
||||||
|
val id: Int,
|
||||||
val artist: String?,
|
val artist: String?,
|
||||||
val creator: String?,
|
val creator: String?,
|
||||||
val source: String?,
|
val source: String?,
|
||||||
|
|||||||
@ -0,0 +1,28 @@
|
|||||||
|
package com.nisemoe.nise.osu
|
||||||
|
|
||||||
|
fun OsuApiModels.Beatmap.toScoreBeatmap(): OsuApiModels.ScoreBeatmap =
|
||||||
|
OsuApiModels.ScoreBeatmap(
|
||||||
|
id = this.id,
|
||||||
|
checksum = this.checksum,
|
||||||
|
difficulty_rating = this.difficulty_rating,
|
||||||
|
version = this.version,
|
||||||
|
max_combo = this.max_combo,
|
||||||
|
total_length = this.total_length,
|
||||||
|
bpm = this.bpm,
|
||||||
|
accuracy = this.accuracy,
|
||||||
|
ar = this.ar,
|
||||||
|
cs = this.cs,
|
||||||
|
drain = this.drain,
|
||||||
|
count_circles = this.count_circles,
|
||||||
|
count_sliders = this.count_sliders,
|
||||||
|
count_spinners = this.count_spinners,
|
||||||
|
)
|
||||||
|
|
||||||
|
fun OsuApiModels.BeatmapSet.toScoreBeatmapSet(): OsuApiModels.ScoreBeatmapset =
|
||||||
|
OsuApiModels.ScoreBeatmapset(
|
||||||
|
id = this.id,
|
||||||
|
title = this.title,
|
||||||
|
artist = this.artist,
|
||||||
|
creator = this.creator,
|
||||||
|
source = this.source,
|
||||||
|
)
|
||||||
Loading…
Reference in New Issue
Block a user