mirror of
https://github.com/owenlejeune/MYDex.git
synced 2025-11-08 08:22:42 -05:00
create models
This commit is contained in:
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.owenlejeune.mydex.api
|
||||
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.JsonElement
|
||||
import com.google.gson.TypeAdapter
|
||||
import com.google.gson.TypeAdapterFactory
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.google.gson.stream.JsonReader
|
||||
import com.google.gson.stream.JsonWriter
|
||||
import java.io.IOException
|
||||
import java.lang.reflect.Field
|
||||
|
||||
/**
|
||||
* credits to https://github.com/Tishka17/gson-flatten for inspiration
|
||||
* Author: A$CE
|
||||
*/
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
@Target(AnnotationTarget.FIELD)
|
||||
annotation class Flatten(val path: String)
|
||||
|
||||
class FlattenTypeAdapterFactory(
|
||||
private val pathDelimiter: String = "."
|
||||
): TypeAdapterFactory {
|
||||
|
||||
override fun <T: Any?> create(gson: Gson, type: TypeToken<T>): TypeAdapter<T> {
|
||||
val delegateAdapter = gson.getDelegateAdapter(this, type)
|
||||
val defaultAdapter = gson.getAdapter(JsonElement::class.java)
|
||||
val flattenedFieldsCache = buildFlattenedFieldsCache(type.rawType)
|
||||
|
||||
return object: TypeAdapter<T>() {
|
||||
|
||||
@Throws(IOException::class)
|
||||
override fun read(reader: JsonReader): T {
|
||||
// if this class has no flattened fields, parse it with regular adapter
|
||||
if(flattenedFieldsCache.isEmpty())
|
||||
return delegateAdapter.read(reader)
|
||||
// read the whole json string into a jsonElement
|
||||
val rootElement = defaultAdapter.read(reader)
|
||||
// if not a json object (array, string, number, etc.), parse it
|
||||
if(!rootElement.isJsonObject)
|
||||
return delegateAdapter.fromJsonTree(rootElement)
|
||||
// it's a json object of type T, let's deal with it
|
||||
val root = rootElement.asJsonObject
|
||||
// parse each field
|
||||
for(field in flattenedFieldsCache) {
|
||||
var element: JsonElement? = root
|
||||
// dive down the path to find the right element
|
||||
for(node in field.path) {
|
||||
// can't dive down null elements, break
|
||||
if(element == null) break
|
||||
// reassign element to next node down
|
||||
element = when {
|
||||
element.isJsonObject -> element.asJsonObject[node]
|
||||
element.isJsonArray -> try {
|
||||
element.asJsonArray[node.toInt()]
|
||||
} catch(e: Exception) { // NumberFormatException | IndexOutOfBoundsException
|
||||
null
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
// lift deep element to root element level
|
||||
root.add(field.name, element)
|
||||
// this keeps nested element un-removed (i suppose for speed)
|
||||
}
|
||||
// now parse flattened json
|
||||
return delegateAdapter.fromJsonTree(root)
|
||||
}
|
||||
|
||||
override fun write(out: JsonWriter, value: T) {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}.nullSafe()
|
||||
}
|
||||
|
||||
// build a cache for flattened fields's paths and names (reflection happens only here)
|
||||
private fun buildFlattenedFieldsCache(root: Class<*>): Array<FlattenedField> {
|
||||
// get all flattened fields of this class
|
||||
var clazz: Class<*>? = root
|
||||
val flattenedFields = ArrayList<Field>()
|
||||
while(clazz != null) {
|
||||
clazz.declaredFields.filterTo(flattenedFields) {
|
||||
it.isAnnotationPresent(Flatten::class.java)
|
||||
}
|
||||
clazz = clazz.superclass
|
||||
}
|
||||
|
||||
if(flattenedFields.isEmpty()) {
|
||||
return emptyArray()
|
||||
}
|
||||
val delimiter = pathDelimiter
|
||||
return Array(flattenedFields.size) { i ->
|
||||
val ff = flattenedFields[i]
|
||||
val a = ff.getAnnotation(Flatten::class.java)!!
|
||||
val nodes = a.path.split(delimiter)
|
||||
.filterNot { it.isEmpty() } // ignore multiple or trailing dots
|
||||
.toTypedArray()
|
||||
FlattenedField(ff.name, nodes)
|
||||
}
|
||||
}
|
||||
|
||||
private class FlattenedField(val name: String, val path: Array<String>)
|
||||
}
|
||||
|
||||
//val gson = GsonBuilder()
|
||||
// .registerTypeAdapterFactory(FlattenTypeAdapterFactory())
|
||||
// .create()
|
||||
//Retrofit.Builder()
|
||||
//.baseUrl(baseUrl)
|
||||
//...
|
||||
//.addConverterFactory(GsonConverterFactory.create(gson))
|
||||
//.build()
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi
|
||||
|
||||
class PokeApiClient {
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.berry
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class Berry(
|
||||
@SerializedName("firmness") val firmness: NameAndUrl,
|
||||
@SerializedName("flavors") val flavors: List<Flavor>,
|
||||
@SerializedName("growth_time") val growthTime: Int,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("item") val item: NameAndUrl,
|
||||
@SerializedName("max_harvest") val maxHarvest: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("natural_gift_power") val naturalGiftPower: Int,
|
||||
@SerializedName("natural_gift_type") val naturalGiftType: NameAndUrl,
|
||||
@SerializedName("size") val size: Int,
|
||||
@SerializedName("smoothness") val smoothness: Int,
|
||||
@SerializedName("soil_dryness") val soilDryness: Int
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.berry
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class BerryFirmness(
|
||||
@SerializedName("berries") val berries: List<NameAndUrl>,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.berry
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class BerryFlavor(
|
||||
@SerializedName("berries") val berries: List<FlavorBerries>,
|
||||
@SerializedName("contest_type") val contestType: NameAndUrl,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.berry
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class Flavor(
|
||||
@SerializedName("potency") val potency: Int,
|
||||
@SerializedName("flavor") val flavor: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.berry
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class FlavorBerries(
|
||||
@SerializedName("potency") val potency: Int,
|
||||
@SerializedName("berry") val berry: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.contest
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability.EffectEntry
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability.FlavorTextEntry
|
||||
|
||||
class ContestEffect(
|
||||
@SerializedName("appeal") val appeal: Int,
|
||||
@SerializedName("effect_entries") val effectEntries: List<EffectEntry>,
|
||||
@SerializedName("flavor_text_entries") val flavorTextEntries: List<FlavorTextEntry>,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("jam") val jam: Int
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.contest
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class ContestType(
|
||||
@SerializedName("berry_flavor") val berryFlavor: NameAndUrl,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.contest
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability.FlavorTextEntry
|
||||
|
||||
class SuperContestEffect(
|
||||
@SerializedName("appeal") val appeal: Int,
|
||||
@SerializedName("flavor_text_entries") val flavorTextEntries: List<FlavorTextEntry>,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("moves") val moves: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.encounter
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class EncounterCondition(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("values") val values: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.encounter
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class EncounterConditionValue(
|
||||
@SerializedName("condition") val condition: NameAndUrl,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.encounter
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class EncounterDetails(
|
||||
@SerializedName("chance") val chance: Int,
|
||||
@SerializedName("max_level") val maxLevel: Int,
|
||||
@SerializedName("method") val method: NameAndUrl,
|
||||
@SerializedName("min_level") val minLevel: Int,
|
||||
@SerializedName("condition_values") val conditionValues: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.encounter
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
|
||||
class EncounterMethod(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("order") val order: Int
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.encounter
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.game.VersionDetails
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class PokemonEncounter(
|
||||
@SerializedName("pokemon") val pokemon: NameAndUrl,
|
||||
@SerializedName("version_details") val versionDetails: List<VersionDetails>
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.evolution
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class ChainLink(
|
||||
@SerializedName("is_baby") val isBaby: Boolean,
|
||||
@SerializedName("species") val species: NameAndUrl,
|
||||
@SerializedName("evolution_details") val evolutionDetails: EvolutionDetails,
|
||||
@SerializedName("evolves_to") val evolves_to: List<ChainLink>?
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.evolution
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class EvolutionChain(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("baby_trigger_item") val babyTriggerItem: NameAndUrl?,
|
||||
@SerializedName("chain") val chain: ChainLink
|
||||
)
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.evolution
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class EvolutionDetails(
|
||||
@SerializedName("item") val item: NameAndUrl,
|
||||
@SerializedName("trigger") val trigger: NameAndUrl,
|
||||
@SerializedName("gender") val gender: Int,
|
||||
@SerializedName("held_item") val heldItem: NameAndUrl,
|
||||
@SerializedName("known_move") val knownMove: NameAndUrl,
|
||||
@SerializedName("known_move_type") val knownMoveType: NameAndUrl,
|
||||
@SerializedName("location") val location: NameAndUrl,
|
||||
@SerializedName("min_level") val minLevel: Int,
|
||||
@SerializedName("min_happiness") val minHappiness: Int,
|
||||
@SerializedName("min_beauty") val minBeauty: Int,
|
||||
@SerializedName("min_affection") val minAffection: Int,
|
||||
@SerializedName("needs_overworld_rain") val needsOverworldRain: Boolean,
|
||||
@SerializedName("party_species") val partySpecies: NameAndUrl,
|
||||
@SerializedName("party_type") val partyType: NameAndUrl,
|
||||
@SerializedName("relative_physical_stats") val relativePhysicalStats: Int,
|
||||
@SerializedName("time_of_day") val timeOfDay: String,
|
||||
@SerializedName("trade_species") val tradeSpecies: NameAndUrl,
|
||||
@SerializedName("turn_upside_down") val turnUpsideDown: Boolean
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.evolution
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class EvolutionTrigger(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: NameAndLanguage,
|
||||
@SerializedName("pokemon_species") val pokemonSpecies: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.game
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class Generation(
|
||||
@SerializedName("abilities") val abilities: List<NameAndUrl>,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("main_region") val mainRegion: NameAndUrl,
|
||||
@SerializedName("moves") val moves: List<NameAndUrl>,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("pokemon_species") val pokemonSpecies: List<NameAndLanguage>,
|
||||
@SerializedName("types") val types: List<NameAndUrl>,
|
||||
@SerializedName("version_groups") val versionGroups: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.game
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.Description
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class Pokedex(
|
||||
@SerializedName("descriptions") val descriptions: List<Description>,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("is_main_series") val isMainSeries: Boolean,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("pokemon_entries") val pokemonEntries: List<PokemonEntry>,
|
||||
@SerializedName("region") val region: NameAndUrl,
|
||||
@SerializedName("version_groups") val regionGroups: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.game
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class PokedexNumber(
|
||||
@SerializedName("entry_number") val entryNumber: Int,
|
||||
@SerializedName("pokedex") val pokedex: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.game
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class PokemonEntry(
|
||||
@SerializedName("entry_number") val entryNumber: Int,
|
||||
@SerializedName("pokemon_species") val pokemonSpecies: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.game
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class Version(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("version_group") val versionGroup: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.game
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.encounter.EncounterDetails
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class VersionDetails(
|
||||
@SerializedName("encounter_details") val encounterDetails: List<EncounterDetails>,
|
||||
@SerializedName("max_chance") val maxChance: Int,
|
||||
@SerializedName("version") val version: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.game
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class VersionGroup(
|
||||
@SerializedName("generation") val generation: NameAndUrl,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("move_learn_method") val moveLearnMethod: List<NameAndUrl>,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("order") val order: Int,
|
||||
@SerializedName("pokedexes") val pokedexes: List<NameAndUrl>,
|
||||
@SerializedName("regions") val regions: List<NameAndUrl>,
|
||||
@SerializedName("versions") val versions: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.items
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.machine.MachineDetails
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.PokemonGameIndex
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability.EffectEntry
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability.FlavorTextEntry
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.sprite.ItemSprites
|
||||
|
||||
class Item(
|
||||
@SerializedName("attributes") val attributes: List<NameAndUrl>,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("cost") val cost: Int,
|
||||
@SerializedName("fling_power") val flingPower: Int,
|
||||
@SerializedName("fling_effect") val flingEffect: NameAndUrl,
|
||||
@SerializedName("category") val category: NameAndUrl,
|
||||
@SerializedName("effect_entries") val effectEntries: List<EffectEntry>,
|
||||
@SerializedName("flavor_text_entries") val flavorTextEntries: List<FlavorTextEntry>,
|
||||
@SerializedName("game_indices") val gameIndices: List<PokemonGameIndex>,
|
||||
@SerializedName("held_by_pokemon") val heldByPokemon: List<ItemHolderPokemon>,
|
||||
@SerializedName("machines") val machines: List<MachineDetails>,
|
||||
@SerializedName("sprites") val defaultSprite: ItemSprites
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.items
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.Description
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class ItemAttribute(
|
||||
@SerializedName("descriptions") val descriptions: List<Description>,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("items") val items: List<NameAndUrl>,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.items
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class ItemCategory(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("items") val items: List<NameAndUrl>,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("pocket") val pocket: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.items
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability.EffectEntry
|
||||
|
||||
class ItemFlingEffect(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("effect_entries") val effectEntries: List<EffectEntry>,
|
||||
@SerializedName("items") val items: List<NameAndUrl>,
|
||||
@SerializedName("name") val name: String
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.items
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class ItemHolderPokemon(
|
||||
@SerializedName("rarity") val rarity: Int,
|
||||
@SerializedName("version") val version: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.items
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class ItemPocket(
|
||||
@SerializedName("categories") val categories: List<NameAndUrl>,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.location
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.PokemonGameIndex
|
||||
|
||||
class Location(
|
||||
@SerializedName("areas") val areas: List<NameAndUrl>,
|
||||
@SerializedName("game_indices") val gameIndices: List<PokemonGameIndex>,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("region") val region: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.location
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.encounter.PokemonEncounter
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class LocationArea(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("game_index") val gameIndex: Int,
|
||||
@SerializedName("location") val location: NameAndUrl,
|
||||
@SerializedName("pokemon_encounters") val pokemonEncounters: List<PokemonEncounter>
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.location
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class PalParkArea(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndUrl>,
|
||||
@SerializedName("pokemon_encounters") val pokemonEncounters: List<PalParkEncounterPokemon>
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.location
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class PalParkEncounter(
|
||||
@SerializedName("rate") val rate: Int,
|
||||
@SerializedName("base_score") val baseScore: Int,
|
||||
@SerializedName("area") val area: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.location
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class PalParkEncounterPokemon(
|
||||
@SerializedName("rate") val rate: Int,
|
||||
@SerializedName("base_score") val baseScore: Int,
|
||||
@SerializedName("pokemon_species") val pokemonSpecies: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.location
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class Region(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("locations") val locations: List<NameAndUrl>,
|
||||
@SerializedName("main_generation") val mainGeneration: NameAndUrl,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("pokedexes") val pokedexes: List<NameAndUrl>,
|
||||
@SerializedName("version_groups") val versionGroups: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.machine
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class Machine(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("item") val item: NameAndUrl,
|
||||
@SerializedName("move") val move: NameAndUrl,
|
||||
@SerializedName("version_group") val versionGroup: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.machine
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class MachineDetails(
|
||||
@SerializedName("machine.url") val machineUrl: String,
|
||||
@SerializedName("version_group") val versionGroup: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.misc
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class AwesomeName(
|
||||
@SerializedName("awesome_name") val awesomeName: String,
|
||||
@SerializedName("language") val language: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.misc
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class DamageRelations(
|
||||
@SerializedName("double_damage_from") val doubleDamageFrom: List<NameAndUrl>,
|
||||
@SerializedName("double_damage_to") val doubleDamageTo: List<NameAndUrl>,
|
||||
@SerializedName("half_damage_from") val halfDamageFrom: List<NameAndUrl>,
|
||||
@SerializedName("half_damage_to") val halfDamageTo: List<NameAndUrl>,
|
||||
@SerializedName("no_damage_to") val noDamageTo: List<NameAndUrl>,
|
||||
@SerializedName("no_damage_from") val noDamageFrom: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.misc
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class Description(
|
||||
@SerializedName("description") val description: String,
|
||||
@SerializedName("language") val language: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.misc
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class Genus(
|
||||
@SerializedName("genus") val genus: String,
|
||||
@SerializedName("language") val language: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.misc
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class Language(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("iso3166") val iso3166: String,
|
||||
@SerializedName("iso639") val iso639: String,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("official") val isOfficial: Boolean
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.misc
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class NameAndLanguage(
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("language.name") val language: String,
|
||||
@SerializedName("language.url") val languageUrl: String
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.misc
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class NameAndUrl(
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("url") val url: String
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.misc
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class PastDamageRelation(
|
||||
@SerializedName("damage_relation") val damageRelation: DamageRelations,
|
||||
@SerializedName("generation") val generation: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.misc
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class Stat(
|
||||
@SerializedName("base_stat") val baseStat: Int,
|
||||
@SerializedName("effort") val effort: Int,
|
||||
@SerializedName("stat") val stat: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.misc
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class Type(
|
||||
@SerializedName("slot") val slot: Int,
|
||||
@SerializedName("type") val type: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.misc
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class TypePokemon(
|
||||
@SerializedName("slot") val slot: Int,
|
||||
@SerializedName("pokemon") val pokemon: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.misc
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class Variety(
|
||||
@SerializedName("is_default") val isDefault: Boolean,
|
||||
@SerializedName("pokemon") val pokemon: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.move
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class ContestCombo(
|
||||
@SerializedName("use_after") val useAfter: List<NameAndUrl>?,
|
||||
@SerializedName("use_before") val useBefore: List<NameAndUrl>?
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.move
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class ContestCombos(
|
||||
@SerializedName("normal") val normalCombo: ContestCombo?,
|
||||
@SerializedName("super") val superCombo: ContestCombo?
|
||||
)
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.move
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.machine.MachineDetails
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability.EffectChange
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability.EffectEntry
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability.FlavorTextEntry
|
||||
|
||||
class Move (
|
||||
@SerializedName("accuracy") val accuracy: Int,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndUrl>,
|
||||
@SerializedName("power") val power: Int,
|
||||
@SerializedName("pp") val pp: Int,
|
||||
@SerializedName("priority") val priority: Int,
|
||||
@SerializedName("contest_combos") val contestCombos: ContestCombos,
|
||||
@SerializedName("contest_effect.url") val contestEffectUrl: String,
|
||||
@SerializedName("contest_type") val contestType: NameAndUrl,
|
||||
@SerializedName("damage_class") val damageClass: NameAndUrl,
|
||||
@SerializedName("effect_chance") val effectChance: Int,
|
||||
@SerializedName("effect_changes") val effectChanges: List<EffectChange>,
|
||||
@SerializedName("effect_entries") val effectEntries: List<EffectEntry>,
|
||||
@SerializedName("flavor_text_entries") val flavorTextEntries: List<FlavorTextEntry>,
|
||||
@SerializedName("generation") val generation: NameAndUrl,
|
||||
@SerializedName("learned_by_pokemon") val learnedByPokemon: List<NameAndUrl>,
|
||||
@SerializedName("machines") val machines: List<MachineDetails>,
|
||||
@SerializedName("meta") val meta: MoveMeta,
|
||||
@SerializedName("super_contest_effect.url") val superContestEffectUrl: String,
|
||||
@SerializedName("target") val target: NameAndUrl,
|
||||
@SerializedName("type") val type: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.move
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class MoveAilment(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("moves") val moves: List<NameAndUrl>,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.move
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
|
||||
class MoveBattleStyle(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.move
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.Description
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class MoveCategory(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("descriptions") val descriptions: List<Description>,
|
||||
@SerializedName("moves") val moves: List<NameAndUrl>,
|
||||
@SerializedName("name") val name: String
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.move
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.Description
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class MoveDamageClass(
|
||||
@SerializedName("descriptions") val descriptions: List<Description>,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("moves") val moves: List<NameAndUrl>,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.move
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.Description
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class MoveLearnMethod(
|
||||
@SerializedName("descriptions") val descriptions: List<Description>,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("version_groups") val versionGroups: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.move
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class MoveMeta(
|
||||
@SerializedName("ailment") val ailment: NameAndUrl,
|
||||
@SerializedName("ailment_chance") val ailmentChance: Int?,
|
||||
@SerializedName("category") val category: NameAndUrl,
|
||||
@SerializedName("crit_rate") val critRate: Int?,
|
||||
@SerializedName("drain") val drain: Int?,
|
||||
@SerializedName("flinch_chance") val flinchChance: Int?,
|
||||
@SerializedName("healing") val healing: Int?,
|
||||
@SerializedName("max_hits") val maxHits: Int?,
|
||||
@SerializedName("max_turns") val maxTurns: Int?,
|
||||
@SerializedName("min_hits") val minHits: Int?,
|
||||
@SerializedName("min_turns") val minTurns: Int?,
|
||||
@SerializedName("stat_chance") val statChance: Int?
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.move
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.Description
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class MoveTarget(
|
||||
@SerializedName("descriptions") val descriptions: List<Description>,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("moves") val moves: List<NameAndUrl>,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>
|
||||
)
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.Stat
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.Type
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.sprite.Sprites
|
||||
|
||||
class Pokemon(
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("order") val order: Int,
|
||||
@SerializedName("base_experience") val baseExperience: Int,
|
||||
@SerializedName("height") val height: Int,
|
||||
@SerializedName("weight") val weight: Int,
|
||||
@SerializedName("is_default") val isDefault: Boolean,
|
||||
@SerializedName("location_area_encounters") val locationAreaEncountersUrl: String,
|
||||
@SerializedName("abilities") val abilities: List<PokemonAbility>,
|
||||
@SerializedName("forms") val forms: List<NameAndUrl>,
|
||||
@SerializedName("game_indices") val gameIndices: List<PokemonGameIndex>,
|
||||
@SerializedName("moves") val moves: List<PokemonMove>,
|
||||
@SerializedName("species") val species: NameAndUrl,
|
||||
@SerializedName("sprites") val sprites: Sprites,
|
||||
@SerializedName("stats") val state: List<Stat>,
|
||||
@SerializedName("types") val types: List<Type>
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class PokemonAbility(
|
||||
@SerializedName("is_hidden") val isHidden: Boolean,
|
||||
@SerializedName("slot") val slot: Int,
|
||||
@SerializedName("ability.name") val name: String,
|
||||
@SerializedName("ability.url") val url: String
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class PokemonColor(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("pokemon_species") val pokemonSpecies: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.Type
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.pokemon.sprite.Sprites
|
||||
|
||||
class PokemonForm(
|
||||
@SerializedName("form_name") val formName: String,
|
||||
@SerializedName("form_names") val formNames: List<NameAndLanguage>,
|
||||
@SerializedName("form_order") val formOrder: Int,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("is_battle_only") val isBattleOnly: Boolean,
|
||||
@SerializedName("isDefault") val isDefault: Boolean,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("order") val order: Int,
|
||||
@SerializedName("pokemon") val pokemon: NameAndUrl,
|
||||
@SerializedName("sprites") val sprites: Sprites,
|
||||
@SerializedName("types") val types: List<Type>,
|
||||
@SerializedName("version_group") val versionGroup: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class PokemonGameIndex(
|
||||
@SerializedName("game_index") val gameIndex: Int,
|
||||
@SerializedName("version", alternate = ["generation"]) val version: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class PokemonHabitat(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("pokemon_species") val species: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.move.MoveVersionGroupDetails
|
||||
|
||||
class PokemonMove(
|
||||
@SerializedName("move.name") val name: String,
|
||||
@SerializedName("move.url") val url: String,
|
||||
@SerializedName("version_group_details") val versionGroupDetails: List<MoveVersionGroupDetails>
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.AwesomeName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class PokemonShape(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("awesome_names") val awesomeNames: List<AwesomeName>,
|
||||
@SerializedName("pokemon_species") val pokemonSpecies: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.game.PokedexNumber
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.location.PalParkEncounter
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability.FlavorTextEntry
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.*
|
||||
|
||||
class PokemonSpecies(
|
||||
@SerializedName("base_happiness") val baseHappiness: Int,
|
||||
@SerializedName("capture_rate") val captureRate: Int,
|
||||
@SerializedName("color") val color: NameAndUrl,
|
||||
@SerializedName("egg_groups") val eggGroups: List<NameAndUrl>,
|
||||
@SerializedName("evolution_change.url") val evolutionChangeUrl: String,
|
||||
@SerializedName("flavor_text_entries") val flavorTextEntries: List<FlavorTextEntry>,
|
||||
@SerializedName("form_descriptions") val formDescriptions: List<Description>,
|
||||
@SerializedName("forms_switchable") val formsSwitchable: Boolean,
|
||||
@SerializedName("gender_rate") val genderRate: Int,
|
||||
@SerializedName("genera") val genera: List<Genus>,
|
||||
@SerializedName("generation") val generation: NameAndUrl,
|
||||
@SerializedName("growth_rate") val growthRate: NameAndUrl,
|
||||
@SerializedName("habitat") val habitat: NameAndUrl,
|
||||
@SerializedName("has_gender_differences") val hasGenderDifferences: Boolean,
|
||||
@SerializedName("hatch_counter") val hatchCounter: Int,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("is_baby") val isBaby: Boolean,
|
||||
@SerializedName("is_legendary") val isLegendary: Boolean,
|
||||
@SerializedName("is_mythical") val isMythical: Boolean,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("order") val order: Int,
|
||||
@SerializedName("pal_park_encounters") val palParkEncounters: List<PalParkEncounter>,
|
||||
@SerializedName("pokedex_numbers") val pokedexNumbers: List<PokedexNumber>,
|
||||
@SerializedName("shape") val shape: NameAndUrl,
|
||||
@SerializedName("varieties") val varieties: List<Variety>
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class PokemonSpeciesDetails(
|
||||
@SerializedName("rate") val rate: Int,
|
||||
@SerializedName("pokemon_species") val species: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.nature.StatAffectingNatures
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.move.StatAffectingMoves
|
||||
|
||||
class PokemonStat(
|
||||
@SerializedName("affecting_natures") val affectingNatures: StatAffectingNatures,
|
||||
@SerializedName("affecting_moves") val affectingMoves: StatAffectingMoves,
|
||||
@SerializedName("game_index") val gameIndex: Int,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("is_battle_only") val isBattleOnly: Boolean,
|
||||
@SerializedName("move_damage_class") val moveDamageClass: NameAndUrl,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: NameAndLanguage
|
||||
)
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.*
|
||||
|
||||
class PokemonType(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("damage_relations") val damageRelations: DamageRelations,
|
||||
@SerializedName("game_indices") val gameIndices: List<PokemonGameIndex>,
|
||||
@SerializedName("generation") val generation: NameAndUrl,
|
||||
@SerializedName("move_damage_class") val moveDamageClass: NameAndUrl,
|
||||
@SerializedName("moves") val moves: List<NameAndUrl>,
|
||||
@SerializedName("past_damage_relations") val pastDamageRelations: List<PastDamageRelation>,
|
||||
@SerializedName("pokemon") val pokemon: List<TypePokemon>
|
||||
)
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
|
||||
class Ability(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("is_main_series") val isMainSeries: Boolean,
|
||||
@SerializedName("effect_changes") val effectChanges: List<EffectChange>,
|
||||
@SerializedName("effect_entries") val effectEntries: List<EffectEntry>,
|
||||
@SerializedName("flavor_text_entries") val flavourTextEntries: List<FlavorTextEntry>,
|
||||
@SerializedName("generation") val generation: AbilityGeneration,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("pokemon") val pokemon: List<AbilityPokemon>
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class AbilityGeneration(
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("url") val url: String
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class AbilityPokemon(
|
||||
@SerializedName("slot") val slot: Int,
|
||||
@SerializedName("is_hidden") val isHidden: Boolean,
|
||||
@SerializedName("pokemon.name") val name: String,
|
||||
@SerializedName("pokemon.url") val url: String
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class EffectChange(
|
||||
@SerializedName("version_group") val version: NameAndUrl,
|
||||
@SerializedName("effect_entries") val effectEntries: List<EffectEntry>
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class EffectEntry(
|
||||
@SerializedName("language") val language: NameAndUrl,
|
||||
@SerializedName("effect") val effect: String,
|
||||
@SerializedName("short_effect") val shortEffect: String?
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.ability
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class FlavorTextEntry(
|
||||
@SerializedName("flavor_text", alternate = ["text"]) val flavorText: String,
|
||||
@SerializedName("language") val language: NameAndUrl,
|
||||
@SerializedName("version_group") val version: NameAndUrl?
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.characteristic
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.Description
|
||||
|
||||
class Characteristic(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("highest_stat.name") val highestStat: String,
|
||||
@SerializedName("highest_stat.url") val highestStatUrl: String,
|
||||
@SerializedName("possible_values") val possibleValues: List<Int>,
|
||||
@SerializedName("gene_modulo") val geneModulo: Int,
|
||||
@SerializedName("descriptions") val descriptions: List<Description>
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.egggroup
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class EggGroup(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("name") val names: List<NameAndLanguage>,
|
||||
@SerializedName("pokemon_species") val pokemonSpecies: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.gender
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.PokemonSpeciesDetails
|
||||
|
||||
class Gender(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("pokemon_species_details") val pokemonSpeciesDetails: List<PokemonSpeciesDetails>,
|
||||
@SerializedName("required_for_evolution") val requiredForEvolution: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.growthrate
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.Description
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class GrowthRate(
|
||||
@SerializedName("descriptions") val descriptions: List<Description>,
|
||||
@SerializedName("formula") val formula: String,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("levels") val levels: List<GrowthRateLevel>,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("pokemon_species") val pokemonSpecies: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.growthrate
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class GrowthRateLevel(
|
||||
@SerializedName("experience") val experience: Int,
|
||||
@SerializedName("level") val level: Int
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.move
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class MoveVersionGroupDetails(
|
||||
@SerializedName("level_learned_at") val levelLearnedAt: Int,
|
||||
@SerializedName("move_learn_method.name") val moveLearnMethod: String,
|
||||
@SerializedName("move_learn_method.url") val moveLearnMethodUrl: String,
|
||||
@SerializedName("version_group.name") val versionGroup: String,
|
||||
@SerializedName("version_group.url") val versionGroupUrl: String
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.move
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class StatAffectingMove(
|
||||
@SerializedName("change") val change: Int,
|
||||
@SerializedName("move") val move: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.move
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class StatAffectingMoves(
|
||||
@SerializedName("decrease") val decrease: List<StatAffectingMove>,
|
||||
@SerializedName("increase") val increase: List<StatAffectingMove>
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.nature
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class AffectingNature(
|
||||
@SerializedName("max_change") val maxChange: Int,
|
||||
@SerializedName("nature") val nature: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.nature
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class AffectingNatures(
|
||||
@SerializedName("increase") val increase: List<AffectingNature>,
|
||||
@SerializedName("decrease") val decrease: List<AffectingNature>
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.nature
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class MoveBattleStylePreference(
|
||||
@SerializedName("high_hp_preference") val highHpPreference: Int,
|
||||
@SerializedName("low_hp_preference") val lowHpPreference: Int,
|
||||
@SerializedName("move_battle_style") val moveBattleStyle: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.nature
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.pokeathalon.PokeathalonStatChange
|
||||
|
||||
class Nature(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("decreased_stat") val decreasedState: NameAndUrl,
|
||||
@SerializedName("increased_stat") val increasedStat: NameAndUrl,
|
||||
@SerializedName("hates_flavor") val hatesFlavor: NameAndUrl,
|
||||
@SerializedName("likes_flavor") val likesFlavor: NameAndUrl,
|
||||
@SerializedName("move_battle_style_preference") val moveBattleStylePreference: MoveBattleStylePreference,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("pokeathalon_stat_changes") val pokeathalonStatChanges: List<PokeathalonStatChange>
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.nature
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class StatAffectingNatures(
|
||||
@SerializedName("decrease") val decrease: List<NameAndUrl>,
|
||||
@SerializedName("increase") val increase: List<NameAndUrl>
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.pokeathalon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndLanguage
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.nature.AffectingNatures
|
||||
|
||||
class PokeathalonStat(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("names") val names: List<NameAndLanguage>,
|
||||
@SerializedName("affectingNatures") val affectingNatures: AffectingNatures
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.pokeathalon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v3.model.misc.NameAndUrl
|
||||
|
||||
class PokeathalonStatChange(
|
||||
@SerializedName("max_change") val maxChange: Int,
|
||||
@SerializedName("pokeathalon_stat") val pokeathalongStat: NameAndUrl
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.sprite
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class ItemSprites(
|
||||
@SerializedName("default") val default: String
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v3.model.pokemon.sprite
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class Sprites(
|
||||
@SerializedName("back_default") val backDefault: String?,
|
||||
@SerializedName("back_female") val backFemale: String?,
|
||||
@SerializedName("back_shiny") val backShiny: String?,
|
||||
@SerializedName("back_shiny_female") val backShinyFemale: String?,
|
||||
@SerializedName("front_default") val frontDefault: String?,
|
||||
@SerializedName("front_female") val frontFemale: String?,
|
||||
@SerializedName("front_shiny") val frontShiny: String?,
|
||||
@SerializedName("front_shiny_female") val frontShinyFemale: String?
|
||||
)
|
||||
Reference in New Issue
Block a user