io.elderscrollslegends.Keyword.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elderscrolls-legends-sdk-java Show documentation
Show all versions of elderscrolls-legends-sdk-java Show documentation
A java wrapper around the Elder Scrolls: Legends API of https://elderscrollslegends.io
package io.elderscrollslegends
import com.fasterxml.jackson.annotation.JsonProperty
class Keyword {
companion object {
private val queryBuilder = QueryBuilder()
private const val RESOURCE_NAME = "keywords"
@JvmStatic
fun all(): List {
return where(emptyMap())
}
private fun where(predicates: Map): List {
return queryBuilder.where(resource = RESOURCE_NAME, cls = Keywords::class.java, predicates = predicates) { keywords, keywordList ->
keywordList.addAll(keywords?.keywords ?: emptyList())
}
}
}
}
data class Keywords(
val keywords: List,
@JsonProperty("_pageSize")
override val pageSize: Int,
@JsonProperty("_totalCount")
override val totalCount: Int
) : ResultCounters(pageSize, totalCount)