mirror of
https://github.com/owenlejeune/MYDex.git
synced 2025-11-08 16:22:46 -05:00
fixes for flattened json
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v2.model.machine
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.Flatten
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.misc.NameAndUrl
|
||||
|
||||
class MachineDetails(
|
||||
@SerializedName("machine.url") val machineUrl: String,
|
||||
@Flatten("machine.url") val machineUrl: String,
|
||||
@SerializedName("version_group") val versionGroup: NameAndUrl
|
||||
)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v2.model.move
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.Flatten
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.machine.MachineDetails
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.misc.NameAndUrl
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.pokemon.ability.EffectChange
|
||||
@@ -16,7 +17,7 @@ class Move (
|
||||
@SerializedName("pp") val pp: Int,
|
||||
@SerializedName("priority") val priority: Int,
|
||||
@SerializedName("contest_combos") val contestCombos: ContestCombos,
|
||||
@SerializedName("contest_effect.url") val contestEffectUrl: String,
|
||||
@Flatten("contest_effect.url") val contestEffectUrl: String,
|
||||
@SerializedName("contest_type") val contestType: NameAndUrl,
|
||||
@SerializedName("damage_class") val damageClass: NameAndUrl,
|
||||
@SerializedName("effect_chance") val effectChance: Int,
|
||||
@@ -27,7 +28,7 @@ class Move (
|
||||
@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,
|
||||
@Flatten("super_contest_effect.url") val superContestEffectUrl: String,
|
||||
@SerializedName("target") val target: NameAndUrl,
|
||||
@SerializedName("type") val type: NameAndUrl
|
||||
)
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v2.model.pokemon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.misc.NameAndUrl
|
||||
|
||||
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
|
||||
@SerializedName("ability") val ability: NameAndUrl
|
||||
)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v2.model.pokemon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.misc.NameAndUrl
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.pokemon.move.MoveVersionGroupDetails
|
||||
|
||||
class PokemonMove(
|
||||
@SerializedName("move.name") val name: String,
|
||||
@SerializedName("move.url") val url: String,
|
||||
@SerializedName("move") val move: NameAndUrl,
|
||||
@SerializedName("version_group_details") val versionGroupDetails: List<MoveVersionGroupDetails>
|
||||
)
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v2.model.pokemon
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.Flatten
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.game.PokedexNumber
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.location.PalParkEncounter
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.pokemon.ability.FlavorTextEntry
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.misc.*
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.pokemon.ability.FlavorTextEntry
|
||||
|
||||
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,
|
||||
@Flatten("evolution_chain.url") val evolutionChainUrl: String,
|
||||
@SerializedName("flavor_text_entries") val flavorTextEntries: List<FlavorTextEntry>,
|
||||
@SerializedName("form_descriptions") val formDescriptions: List<Description>,
|
||||
@SerializedName("forms_switchable") val formsSwitchable: Boolean,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v2.model.pokemon.ability
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.misc.NameAndUrl
|
||||
|
||||
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
|
||||
@SerializedName("pokemon") val name: NameAndUrl,
|
||||
)
|
||||
|
||||
@@ -2,11 +2,11 @@ package com.owenlejeune.mydex.api.pokeapi.v2.model.pokemon.characteristic
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.misc.Description
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.misc.NameAndUrl
|
||||
|
||||
class Characteristic(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("highest_stat.name") val highestStat: String,
|
||||
@SerializedName("highest_stat.url") val highestStatUrl: String,
|
||||
@SerializedName("highest_stat") val highestStat: NameAndUrl,
|
||||
@SerializedName("possible_values") val possibleValues: List<Int>,
|
||||
@SerializedName("gene_modulo") val geneModulo: Int,
|
||||
@SerializedName("descriptions") val descriptions: List<Description>
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
package com.owenlejeune.mydex.api.pokeapi.v2.model.pokemon.move
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.owenlejeune.mydex.api.pokeapi.v2.model.misc.NameAndUrl
|
||||
|
||||
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
|
||||
@SerializedName("move_learn_method") val moveLearnMethod: NameAndUrl,
|
||||
@SerializedName("version_group") val versionGroup: NameAndUrl,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user