https://github.com/jonasfranz/gitea-client
Kotlin based API client for Gitea
https://github.com/jonasfranz/gitea-client
gitea javascript jvm kotlin kotlin-common
Last synced: 2 months ago
JSON representation
Kotlin based API client for Gitea
- Host: GitHub
- URL: https://github.com/jonasfranz/gitea-client
- Owner: jonasfranz
- License: mit
- Created: 2017-12-29T14:46:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-09T14:18:06.000Z (over 7 years ago)
- Last Synced: 2025-01-22T23:44:05.509Z (4 months ago)
- Topics: gitea, javascript, jvm, kotlin, kotlin-common
- Language: Kotlin
- Homepage:
- Size: 118 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# API-Client for Gitea
[](https://bintray.com/jonasfranzdev/gitea-client/gitea-client/_latestVersion)
[](https://drone.jonasfranz.de/JonasFranzDEV/gitea-client)A Kotlin based API client for [Gitea](https://github.com/go-gitea/gitea).
This project is actually under construction.
## Support
- [X] JavaScript (JS)
- [X] Java (JVM)
## Example
```kotlin
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())
}
```## Using gitea-client
### Gradle-based project
Add the gitea client repository to your module
```groovy
repositories {
jcenter()
maven { url "https://kotlin.bintray.com/kotlinx" }
maven { url "https://dl.bintray.com/jonasfranzdev/gitea-client" }
}
```
#### Common
If you have a [multi platform project](https://kotlinlang.org/docs/reference/multiplatform.html) please
add the `common` dependency to your `common` module. Please also add the JVM and JS dependency to your JS/JVM module.
```groovy
compile 'de.jonasfranz.gitea:gitea-client-common:0.0.6'
```
#### JVM
```groovy
compile 'de.jonasfranz.gitea:gitea-client:0.0.6'
```
#### JS
```groovy
compile 'de.jonasfranz.gitea:gitea-client-js:0.0.6'
```## License
This project is licensed under the MIT License. See the [LICENSE](https://github.com/JonasFranzDEV/gitea-client/blob/master/LICENSE) file for the full license text.