A Kotlin based API client for Gitea.
This project is actually under construction.
- JavaScript (JS)
- Java (JVM)
fun createStatus() = async {
val client = Client("https://your.gitea.instance/api/v1", "YOUR-API-KEY")
val repository = client.repositories.getRepo("organization", "reponame")
val status = repository.createStatus("COMMIT-SHA",
Status.CreateStatusOption(
state = "warning",
context = "API Client Test",
description = "A status created during an automated test",
targetURL = "https://github.com/JonasFranzDEV/gitea-client"
)
)
println(status.createdAt.getTime())
}
Add the gitea client repository to your module
repositories {
jcenter()
maven { url "https://kotlin.bintray.com/kotlinx" }
maven { url "https://dl.bintray.com/jonasfranzdev/gitea-client" }
}
If you have a multi platform project please
add the common
dependency to your common
module. Please also add the JVM and JS dependency to your JS/JVM module.
compile 'de.jonasfranz.gitea:gitea-client-common:0.0.6'
compile 'de.jonasfranz.gitea:gitea-client:0.0.6'
compile 'de.jonasfranz.gitea:gitea-client-js:0.0.6'
This project is licensed under the MIT License. See the LICENSE file for the full license text.