All Downloads are FREE. Search and download functionalities are using the official Maven repository.

me.obsilabor.pistonmetakt.data.launchermeta.Version.kt Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
package me.obsilabor.pistonmetakt.data.launchermeta

import kotlinx.serialization.Serializable
import io.ktor.client.call.*
import io.ktor.client.request.*
import me.obsilabor.pistonmetakt.PistonMetaClient
import me.obsilabor.pistonmetakt.data.pistondata.Downloads
import me.obsilabor.pistonmetakt.data.pistondata.PistonData

@Serializable
data class Version(
    val complianceLevel: Int,
    val id: String,
    val releaseTime: String,
    val sha1: String,
    val time: String,
    val type: String,
    val url: String
) {
    suspend fun getPistonData(): PistonData {
        return PistonMetaClient.ktor.get(url).body()
    }

    suspend fun getDownloads(): Downloads {
        return getPistonData().downloads
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy