https://github.com/azurlane-api/azurlanekt
Wrapper for the unofficial azur lane json api in Kotlin
https://github.com/azurlane-api/azurlanekt
Last synced: 12 days ago
JSON representation
Wrapper for the unofficial azur lane json api in Kotlin
- Host: GitHub
- URL: https://github.com/azurlane-api/azurlanekt
- Owner: azurlane-api
- License: gpl-3.0
- Created: 2019-11-10T22:22:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-25T11:47:10.000Z (over 6 years ago)
- Last Synced: 2025-10-24T16:35:39.725Z (9 months ago)
- Language: Kotlin
- Size: 191 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](https://jitpack.io/#azurlane-api/AzurLaneKt)
[](https://jitci.com/gh/KurozeroPB/AzurLaneKt)
[](https://www.codacy.com/manual/KurozeroPB/AzurLaneKt?utm_source=github.com&utm_medium=referral&utm_content=KurozeroPB/AzurLaneKt&utm_campaign=Badge_Grade)
# AzurLaneKt
Wrapper for the unofficial azur lane json api in Kotlin
## Add dependency
Gradle
```kotlin
repositories {
maven(url = "https://jitpack.io")
}
```
```kotlin
dependencies {
implementation("com.github.azurlane-api:AzurLaneKt:Tag")
}
```
Maven
```xml
jitpack.io
https://jitpack.io
```
```xml
com.github.azurlane-api
AzurLaneKt
Tag
```
## Example
Async request
```kotlin
package com.example
import com.github.azurlane_api.api.AzurLane
import com.github.azurlane_api.api.Category
object Example {
@JvmStatic
fun main(args: Array) {
val azurlane = AzurLane("custom_ua/v0.1.0")
val result = azurlane.getShips(Category.TYPE, "Destroyer").complete { result ->
val (ships, exception) = result
when (result) {
is Result.Success -> {
if (!ships.isNullOrEmpty())
ships.forEach { ship -> println("[${ship.id}]: (${ship.name})") }
}
is Result.Failure -> {
println(exception)
}
}
}
}
}
```
Blocking request
```kotlin
package com.example
import com.github.azurlane_api.api.AzurLane
import com.github.azurlane_api.api.Category
object Example {
@JvmStatic
fun main(args: Array) {
val azurlane = AzurLane("custom_ua/v0.1.0")
val result = azurlane.getShips(Category.RARITY, "Super Rare").complete()
val (ships, exception) = result
when (result) {
is Result.Success -> {
if (!ships.isNullOrEmpty())
ships.forEach { ship -> println("[${ship.id}]: (${ship.name})") }
}
is Result.Failure -> {
println(exception)
}
}
}
}
```
## Support
