me.obsilabor.pistonmetakt.data.pistondata.AssetIndex.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of piston-meta-kt Show documentation
Show all versions of piston-meta-kt Show documentation
Kotlin library to interact with mojangs launchermeta and "piston-data" api
package me.obsilabor.pistonmetakt.data.pistondata
import io.ktor.client.call.*
import io.ktor.client.request.*
import kotlinx.serialization.Serializable
import me.obsilabor.pistonmetakt.PistonMetaClient
import me.obsilabor.pistonmetakt.data.clientjson.AssetObject
import me.obsilabor.pistonmetakt.data.clientjson.ClientAssets
@Serializable
data class AssetIndex(
val id: String,
val sha1: String,
val size: Int,
val totalSize: Int,
val url: String
) {
suspend fun getObjects(): HashMap {
return PistonMetaClient.ktor.get(url).body().objects
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy