https://github.com/theclashfruit/kotrinth
A Modrinth API wrapper for Kotlin.
https://github.com/theclashfruit/kotrinth
ktor modrinth modrinth-api
Last synced: 9 months ago
JSON representation
A Modrinth API wrapper for Kotlin.
- Host: GitHub
- URL: https://github.com/theclashfruit/kotrinth
- Owner: TheClashFruit
- License: mit
- Created: 2024-08-15T15:11:47.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-08T11:31:21.000Z (over 1 year ago)
- Last Synced: 2025-09-17T22:54:35.370Z (9 months ago)
- Topics: ktor, modrinth, modrinth-api
- Language: Kotlin
- Homepage:
- Size: 111 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Kotrinth


A Modrinth API wrapper for Kotlin.
## Getting Started
### Usage
#### Import Kotrinth
Add the repository and dependency to your `build.gradle.kts`:
Beta, Alpha (Snapshots Repo)
```kotlin
maven {
name = "TheClashFruit's Maven Snapshots"
url = uri("https://mvn.theclashfruit.me/snapshots")
}
```
Stable (Releases Repo)
```kotlin
maven {
name = "TheClashFruit's Maven Releases"
url = uri("https://mvn.theclashfruit.me/releases")
}
```
```kotlin
implementation("me.theclashfruit:kotrinth:$version")
```
#### Example
```kotlin
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 = "admin@example.com"
)
// Get a user by their username.
val user = kotrinth.v2.user("TheClashFruit")
// Print the user's id.
println(user.id)
}
```
---
### Cloning
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
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.
## Contributing
You can read the [CONTRIBUTING.md](https://github.com/TheClashFruit/Kotrinth/blob/main/CONTRIBUTING.md) file for details on the project's code of conduct, and the process for submitting pull requests to this project, have fun!
## License
This project is licensed under MIT, if you want to learn more check the [LICENSE](https://github.com/TheClashFruit/Kotrinth/blob/main/LICENSE) file.