This library is in alpha and releases are only available form JitPack for the time being. They will be added to Maven Central once it is stable.
In your Gradle build file:
repositories {
maven("https://jitpack.io")
}
In your app Gradle build file:
dependencies {
implementation("com.github.russellbanks.KtGitHub:KtGitHub:<version>")
}
In a multiplatform project:
val commonMain by getting {
dependencies {
implementation("com.github.russellbanks.KtGitHub:KtGitHub:<version>")
}
}
You also need a Ktor engine:
dependencies {
implementation("io.ktor:ktor-client-<engine>:<version>")
}
In a multiplatform project, make sure to add the engine under each platform. For example:
val jvmMain by getting {
dependencies {
implementation("io.ktor:ktor-client-cio:<version>")
}
}
Create the GitHub object with your engine and an optional DSL builder:
val gitHub = GitHub.create(engine) // CIO, Java, JS, etc
val gitHub = GitHub.create(engine) {
token = "GITHUB TOKEN"
}
Copyright 2023 Russell Banks
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.