All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.elderscrollslegends.Subtype.kt Maven / Gradle / Ivy

Go to download

A java wrapper around the Elder Scrolls: Legends API of https://elderscrollslegends.io

The newest version!
package io.elderscrollslegends

import com.fasterxml.jackson.annotation.JsonProperty

class Subtype {
    companion object {
        private val queryBuilder = QueryBuilder()
        private const val RESOURCE_NAME = "subtypes"

        @JvmStatic
        fun all(): List {
            return where(emptyMap())
        }

        private fun where(predicates: Map): List {
            return queryBuilder.where(resource = RESOURCE_NAME, cls = Subtypes::class.java, predicates = predicates) { types, typeList ->
                typeList.addAll(types?.subtypes ?: emptyList())
            }
        }
    }
}

data class Subtypes(
    val subtypes: List,

    @JsonProperty("_pageSize")
    override val pageSize: Int,
    @JsonProperty("_totalCount")
    override val totalCount: Int
) : ResultCounters(pageSize, totalCount)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy