-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created Resource (removed Pokemons/Generations), added structs for al…
…l endpoints
- Loading branch information
Showing
18 changed files
with
1,314 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package structs | ||
|
||
// Berry is a single berry. | ||
type Berry struct { | ||
Firmness struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"firmness"` | ||
Flavors []struct { | ||
Flavor struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"flavor"` | ||
Potency int `json:"potency"` | ||
} `json:"flavors"` | ||
GrowthTime int `json:"growth_time"` | ||
ID int `json:"id"` | ||
Item struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"item"` | ||
MaxHarvest int `json:"max_harvest"` | ||
Name string `json:"name"` | ||
NaturalGiftPower int `json:"natural_gift_power"` | ||
NaturalGiftType struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"natural_gift_type"` | ||
Size int `json:"size"` | ||
Smoothness int `json:"smoothness"` | ||
SoilDryness int `json:"soil_dryness"` | ||
} | ||
|
||
// BerryFirmness is a single berry firmness. | ||
type BerryFirmness struct { | ||
Berries []struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"berries"` | ||
ID int `json:"id"` | ||
Name string `json:"name"` | ||
Names []struct { | ||
Language struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"language"` | ||
Name string `json:"name"` | ||
} `json:"names"` | ||
} | ||
|
||
// BerryFlavor is a single berry flavor. | ||
type BerryFlavor struct { | ||
Berries []struct { | ||
Berry struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"berry"` | ||
Potency int `json:"potency"` | ||
} `json:"berries"` | ||
ContestType struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"contest_type"` | ||
ID int `json:"id"` | ||
Name string `json:"name"` | ||
Names []struct { | ||
Language struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"language"` | ||
Name string `json:"name"` | ||
} `json:"names"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package structs | ||
|
||
// ContestType is a single contest type. | ||
type ContestType struct { | ||
BerryFlavor struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"berry_flavor"` | ||
ID int `json:"id"` | ||
Name string `json:"name"` | ||
Names []struct { | ||
Color string `json:"color"` | ||
Language struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"language"` | ||
Name string `json:"name"` | ||
} `json:"names"` | ||
} | ||
|
||
// ContestEffect is a single contest effect. | ||
type ContestEffect struct { | ||
Appeal int `json:"appeal"` | ||
EffectEntries []struct { | ||
Effect string `json:"effect"` | ||
Language struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"language"` | ||
} `json:"effect_entries"` | ||
FlavorTextEntries []struct { | ||
FlavorText string `json:"flavor_text"` | ||
Language struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"language"` | ||
} `json:"flavor_text_entries"` | ||
ID int `json:"id"` | ||
Jam int `json:"jam"` | ||
} | ||
|
||
// SuperContestEffect is a single super contest effect. | ||
type SuperContestEffect struct { | ||
Appeal int `json:"appeal"` | ||
FlavorTextEntries []struct { | ||
FlavorText string `json:"flavor_text"` | ||
Language struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"language"` | ||
} `json:"flavor_text_entries"` | ||
ID int `json:"id"` | ||
Moves []struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"moves"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package structs | ||
|
||
// EncounterMethod is a single encounter method. | ||
type EncounterMethod struct { | ||
ID int `json:"id"` | ||
Name string `json:"name"` | ||
Names []struct { | ||
Language struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"language"` | ||
Name string `json:"name"` | ||
} `json:"names"` | ||
Order int `json:"order"` | ||
} | ||
|
||
// EncounterCondition is a single encounter condition. | ||
type EncounterCondition struct { | ||
ID int `json:"id"` | ||
Name string `json:"name"` | ||
Names []struct { | ||
Language struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"language"` | ||
Name string `json:"name"` | ||
} `json:"names"` | ||
Values []struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"values"` | ||
} | ||
|
||
// EncounterConditionValue is a single encounter condition value. | ||
type EncounterConditionValue struct { | ||
ID int `json:"id"` | ||
Name string `json:"name"` | ||
Names []struct { | ||
Language struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"language"` | ||
Name string `json:"name"` | ||
} `json:"names"` | ||
Values []struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"values"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
package structs | ||
|
||
// EvolutionChain is a single evolution chain. | ||
type EvolutionChain struct { | ||
BabyTriggerItem interface{} `json:"baby_trigger_item"` | ||
Chain struct { | ||
EvolutionDetails []interface{} `json:"evolution_details"` | ||
EvolvesTo []struct { | ||
EvolutionDetails []struct { | ||
Gender interface{} `json:"gender"` | ||
HeldItem interface{} `json:"held_item"` | ||
Item interface{} `json:"item"` | ||
KnownMove interface{} `json:"known_move"` | ||
KnownMoveType interface{} `json:"known_move_type"` | ||
Location interface{} `json:"location"` | ||
MinAffection interface{} `json:"min_affection"` | ||
MinBeauty interface{} `json:"min_beauty"` | ||
MinHappiness interface{} `json:"min_happiness"` | ||
MinLevel int `json:"min_level"` | ||
NeedsOverworldRain bool `json:"needs_overworld_rain"` | ||
PartySpecies interface{} `json:"party_species"` | ||
PartyType interface{} `json:"party_type"` | ||
RelativePhysicalStats interface{} `json:"relative_physical_stats"` | ||
TimeOfDay string `json:"time_of_day"` | ||
TradeSpecies interface{} `json:"trade_species"` | ||
Trigger struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"trigger"` | ||
TurnUpsideDown bool `json:"turn_upside_down"` | ||
} `json:"evolution_details"` | ||
EvolvesTo []struct { | ||
EvolutionDetails []struct { | ||
Gender interface{} `json:"gender"` | ||
HeldItem interface{} `json:"held_item"` | ||
Item interface{} `json:"item"` | ||
KnownMove interface{} `json:"known_move"` | ||
KnownMoveType interface{} `json:"known_move_type"` | ||
Location interface{} `json:"location"` | ||
MinAffection interface{} `json:"min_affection"` | ||
MinBeauty interface{} `json:"min_beauty"` | ||
MinHappiness interface{} `json:"min_happiness"` | ||
MinLevel int `json:"min_level"` | ||
NeedsOverworldRain bool `json:"needs_overworld_rain"` | ||
PartySpecies interface{} `json:"party_species"` | ||
PartyType interface{} `json:"party_type"` | ||
RelativePhysicalStats interface{} `json:"relative_physical_stats"` | ||
TimeOfDay string `json:"time_of_day"` | ||
TradeSpecies interface{} `json:"trade_species"` | ||
Trigger struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"trigger"` | ||
TurnUpsideDown bool `json:"turn_upside_down"` | ||
} `json:"evolution_details"` | ||
EvolvesTo []interface{} `json:"evolves_to"` | ||
IsBaby bool `json:"is_baby"` | ||
Species struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"species"` | ||
} `json:"evolves_to"` | ||
IsBaby bool `json:"is_baby"` | ||
Species struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"species"` | ||
} `json:"evolves_to"` | ||
IsBaby bool `json:"is_baby"` | ||
Species struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"species"` | ||
} `json:"chain"` | ||
ID int `json:"id"` | ||
} | ||
|
||
// EvolutionTrigger is a single evolution trigger. | ||
type EvolutionTrigger struct { | ||
ID int `json:"id"` | ||
Name string `json:"name"` | ||
Names []struct { | ||
Language struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"language"` | ||
Name string `json:"name"` | ||
} `json:"names"` | ||
PokemonSpecies []struct { | ||
Name string `json:"name"` | ||
URL string `json:"url"` | ||
} `json:"pokemon_species"` | ||
} |
Oops, something went wrong.