You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Pod/Classes/PokemonKit.swift
+197Lines changed: 197 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,171 @@ let baseURL: String = "http://pokeapi.co/api/v2"
19
19
20
20
// MARK: Classes
21
21
22
+
/*
23
+
entry_number The index number within the Pokédex integer
24
+
name The Pokédex the referenced Pokémon species can be found in NamedAPIResource (Pokedex)
25
+
*/
26
+
publicclassPKMPokemonSpeciesDexEntry:Mappable{
27
+
publicvarentryNumber:Int?
28
+
publicvarname:PKMNamedAPIResource?
29
+
30
+
requiredpublicinit?(_ map:Map){
31
+
32
+
}
33
+
34
+
publicfunc mapping(map:Map){
35
+
entryNumber <-map["entry_number"]
36
+
name <-map["name"]
37
+
}
38
+
}
39
+
40
+
/*
41
+
base_score The base score given to the player when the referenced Pokémon is caught during a pal park run integer
42
+
rate The base rate for encountering the referenced Pokémon in this pal park area integer
43
+
area The pal park area where this encounter happens NamedAPIResource (PalParkArea)
44
+
*/
45
+
publicclassPKMPalParkEncounterArea:Mappable{
46
+
publicvarbaseScore:Int?
47
+
publicvarrate:Int?
48
+
publicvararea:PKMNamedAPIResource?
49
+
50
+
requiredpublicinit?(_ map:Map){
51
+
52
+
}
53
+
54
+
publicfunc mapping(map:Map){
55
+
baseScore <-map["base_score"]
56
+
rate <-map["rate"]
57
+
area <-map["area"]
58
+
}
59
+
}
60
+
61
+
/*
62
+
flavor_text The localized flavor text for an API resource in a specific language string
63
+
language The language this name is in NamedAPIResource (Language)
64
+
version The version this flavor text entry is used in NamedAPIResource (Version)
65
+
*/
66
+
publicclassPKMPokemonSpeciesFlavorText:Mappable{
67
+
publicvarflavorText:String?
68
+
publicvarlanguage:PKMNamedAPIResource?
69
+
publicvarversion:PKMNamedAPIResource?
70
+
71
+
requiredpublicinit?(_ map:Map){
72
+
73
+
}
74
+
75
+
publicfunc mapping(map:Map){
76
+
flavorText <-map["flavor_text"]
77
+
language <-map["language"]
78
+
version <-map["version"]
79
+
}
80
+
}
81
+
82
+
/*
83
+
genus The localized genus for the referenced pokemon species string
84
+
language The language this genus is in NamedAPIResource (Language)
85
+
*/
86
+
publicclassPKMGenus:Mappable{
87
+
publicvargenus:String?
88
+
publicvarlanguage:PKMNamedAPIResource?
89
+
90
+
requiredpublicinit?(_ map:Map){
91
+
92
+
}
93
+
94
+
publicfunc mapping(map:Map){
95
+
genus <-map["genus"]
96
+
language <-map["language"]
97
+
}
98
+
}
99
+
100
+
101
+
/*
102
+
id The identifier for this Pokémon species resource integer
103
+
name The name for this Pokémon species resource string
104
+
order The order in which species should be sorted. Based on National Dex order, except families are grouped together and sorted by stage. integer
105
+
gender_rate The chance of this Pokémon being female, in eighths; or -1 for genderless integer
106
+
capture_rate The base capture rate; up to 255. The higher the number, the easier the catch. integer
107
+
base_happiness The happiness when caught by a normal Pokéball; up to 255. The higher the number, the happier the Pokémon. integer
108
+
is_baby Whether or not this is a baby Pokémon boolean
109
+
hatch_counter Initial hatch counter: one must walk 255 × (hatch_counter + 1) steps before this Pokémon's egg hatches, unless utilizing bonuses like Flame Body's integer
110
+
has_gender_differences Whether or not this Pokémon can have different genders boolean
111
+
forms_switchable Whether or not this Pokémon has multiple forms and can switch between them boolean
112
+
growth_rate The rate at which this Pokémon species gains levels NamedAPIResource (GrowthRate)
113
+
pokedex_numbers A list of pokedexes and the indexes reserved within them for this Pokémon species list PokemonSpeciesDexEntry
114
+
egg_groups A list of egg groups this Pokémon species is a member of list NamedAPIResource (EggGroup)
115
+
color The color of this Pokémon for gimmicky Pokédex search list NamedAPIResource (PokemonColor)
116
+
shape The shape of this Pokémon for gimmicky Pokédex search list NamedAPIResource (PokemonShape)
117
+
evolves_from_species The Pokémon species that evolves into this pokemon_species NamedAPIResource (PokemonSpecies)
118
+
evolution_chain The evolution chain this Pokémon species is a member of APIResource (EvolutionChain)
119
+
habitat The habitat this Pokémon species can be encountered in NamedAPIResource (PokemonHabitat)
120
+
generation The generation this Pokémon species was introduced in NamedAPIResource (Generation)
121
+
names The name of this Pokémon species listed in different languages list Name
122
+
pal_park_encounters A list of encounters that can be had with this Pokémon species in pal park list PalParkEncounterArea
123
+
flavor_text_entries The flavor text of this flavor text listed in different languages list PokemonSpeciesFlavorText
124
+
form_descriptions Descriptions of different forms Pokémon take on within the Pokémon species list Description
125
+
genera The genus of this Pokémon species listed in multiple languages Genus
126
+
varieties A list of the Pokémon that exist within this Pokémon species list NamedAPIResource (Pokemon)
0 commit comments