https://github.com/buried-in-code/kraken
A Java/Kotlin wrapper for the Metron API.
https://github.com/buried-in-code/kraken
kotlin-jvm metron-api
Last synced: 3 months ago
JSON representation
A Java/Kotlin wrapper for the Metron API.
- Host: GitHub
- URL: https://github.com/buried-in-code/kraken
- Owner: Buried-In-Code
- License: mit
- Created: 2024-09-13T11:11:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-21T08:03:53.000Z (4 months ago)
- Last Synced: 2025-08-21T10:29:47.348Z (4 months ago)
- Topics: kotlin-jvm, metron-api
- Language: Kotlin
- Homepage: https://buried-in-code.github.io/Kraken/
- Size: 259 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kraken



[](https://github.com/gradle/gradle)
[](https://github.com/diffplug/spotless)
[](https://github.com/Buried-In-Code/Kraken/tags)
[](https://opensource.org/licenses/MIT)
[](https://github.com/Buried-In-Code/Kraken/graphs/contributors)
[](https://github.com/Buried-In-Code/Kraken/actions/workflows/testing.yaml)
[](https://github.com/Buried-In-Code/Kraken/actions/workflows/docs.yaml)
A Java/Kotlin wrapper for the [Metron](https://metron.cloud) API.
## Installation
To get started with Kraken, add the [JitPack](https://jitpack.io) repository to your `build.gradle.kts`.
```kts
repositories {
maven("https://jitpack.io")
}
```
Then, add Kraken as a dependency.
```kts
dependencies {
implementation("com.github.Buried-In-Code:Kraken:0.4.0")
}
```
### Example Usage
```kt
import github.buriedincode.kraken.Metron
import github.buriedincode.kraken.SQLiteCache
import github.buriedincode.kraken.AuthenticationException
import github.buriedincode.kraken.RateLimitException
import github.buriedincode.kraken.ServiceException
fun main() {
try {
val session = Metron(username="Username", password="Password", cache=SQLiteCache())
// Get all Marvel comics for the week of 2021-06-07
val thisWeek = session.listIssues(params = mapOf(
"store_date_range_after" to "2021-06-07",
"store_date_range_before" to "2021-06-13",
"publisher_name" to "marvel"
))
// Print the results
thisWeek.forEach {
println("${it.id} ${it.name}")
}
// Retrieve the detail for an individual issue
val asm68 = session.getIssue(id = 31660)
// Print the issue Description
println(asm68.description)
} catch (ae: AuthenticationException) {
println("Invalid Metron Username/Password.")
} catch(re: RatelimitException) {
println("Rate limit exceeded. Please try again later.")
} catch (se: ServiceException) {
println("Unsuccessful request: ${se.message}")
}
}
```
## Documentation
- [Kraken](https://buried-in-code.github.io/Kraken)
- [Metron API](https://metron.cloud/docs/)
## Bugs/Requests
Please use the [GitHub issue tracker](https://github.com/Buried-In-Code/Kraken/issues) to submit bugs or request features.
## Socials
[](https://fosstodon.org/@BuriedInCode)\
[](https://matrix.to/#/#The-Dev-Environment:matrix.org)