![JAR search and dependency download from the Maven repository](/logo.png)
commonMain.eu.codlab.tcgmapper.AbstractLoader.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tcg-mapper-jvm Show documentation
Show all versions of tcg-mapper-jvm Show documentation
Kotlin Multiplatform TCG Mapper
The newest version!
package eu.codlab.tcgmapper
import kotlinx.serialization.KSerializer
import kotlinx.serialization.StringFormat
open class AbstractLoader(
file: String,
serializer: KSerializer,
github: GithubConfiguration,
fileResource: suspend () -> ByteArray,
) {
private val loader: Loader = Loader(
file,
serializer,
github,
fileResource,
)
suspend fun loadFromGithub(tag: String = "main") = loader.loadFromGithub(tag)
suspend fun loadFromResource() = loader.loadFromResource()
fun to(values: T, encoder: StringFormat = Provider.json) = loader.to(values, encoder)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy