Kotlin Multiplatform GitHub API Client
// Create a GitHub client
val github = Octokod {
token = "your-github-token" // Optional: for authenticated requests
baseUrl = "https://api.github.com" // Optional: defaults to GitHub API
}
// Make API requests
suspend fun example() {
// Get authenticated user information
val user = github.get("user")
// Get repository information
val repo = github.get("repos/owner/repo")
// Create an issue
val response = github.post("repos/owner/repo/issues") {
body = """
{
"title": "Issue title",
"body": "Issue description"
}
""".trimIndent()
}
}- Add the Maven Central repository to your project:
repositories {
mavenCentral()
}- Add the dependency to your project:
dependencies {
implementation("io.github.devcrocod:octokod:$latest_version")
}- Configure the client with your GitHub credentials and start making API requests.
- JVM
- iOS (X64, Arm64, Simulator)
- macOS (X64, Arm64)
- Linux (X64)
- Windows (X64)
Contributions are welcome! Here's how you can help:
- Report bugs or request features by creating issues
- Submit pull requests for bug fixes or new features
- Improve documentation
- Share your feedback and suggestions
Please ensure your pull requests adhere to the existing code style and include appropriate tests.
This project is licensed under the Apache License 2.0 — see below for details: