A Modrinth API wrapper for Kotlin.
Add the repository and dependency to your build.gradle.kts
:
Beta, Alpha (Snapshots Repo)
maven {
name = "TheClashFruit's Maven Snapshots"
url = uri("https://mvn.theclashfruit.me/snapshots")
}
Stable (Releases Repo)
maven {
name = "TheClashFruit's Maven Releases"
url = uri("https://mvn.theclashfruit.me/releases")
}
implementation("me.theclashfruit:kotrinth:$version")
package com.example
import me.theclashfruit.kotrinth.Kotrinth
suspend fun main() {
// Create a new Kotrinth instance.
val kotrinth = Kotrinth(
appName = "Example",
appVersion = "1.0.0",
appContact = "[email protected]"
)
// Get a user by their username.
val user = kotrinth.v2.user("TheClashFruit")
// Print the user's id.
println(user.id)
}
This repository doesn't use any special stuff, so we can clone it in to old-fashioned way of git clone https://github.com/TheClashFruit/Kotrinth.git
.
Building is also straight forward, open the project in your desired code editor, IDE or just a terminal then just run ./gradlew build
in a terminal.
You can read the CONTRIBUTING.md file for details on the project's code of conduct, and the process for submitting pull requests to this project, have fun!
This project is licensed under MIT, if you want to learn more check the LICENSE file.