-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
86 lines (71 loc) · 2.21 KB
/
types.go
File metadata and controls
86 lines (71 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package main
import "github.com/kenzo/pokedexcli/internal/pokecache"
const pokeDexLimitOffset = 20
type (
cliCommand struct {
name string
description string
callback func([]string) error
}
cliCommandEntry struct {
cmdName string
cmd cliCommand
}
cliCmdRegister map[string]cliCommand
ANSIColor string
PokeDexEntity struct {
Name string `json:"name"`
Url string `json:"url"`
}
PokeDexLocation PokeDexEntity
PokeDexLocationsData struct {
LocationsCount int `json:"count"`
Next string `json:"next"`
Previous any `json:"previous"`
Locations []PokeDexLocation `json:"results"`
}
PokeDexPokemon PokeDexEntity
PokeDexPokemonEncounters struct {
ID int `json:"id"`
Location PokeDexEntity `json:"location"`
Name string `json:"name"`
PokemonEncounters []struct {
Pokemon PokeDexPokemon `json:"pokemon"`
VersionDetails []struct {
EncounterDetails []struct {
Chance int `json:"chance"`
ConditionValues []any `json:"condition_values"`
MaxLevel int `json:"max_level"`
Method PokeDexEntity `json:"method"`
MinLevel int `json:"min_level"`
} `json:"encounter_details"`
MaxChance int `json:"max_chance"`
Version PokeDexEntity `json:"version"`
} `json:"version_details"`
} `json:"pokemon_encounters"`
}
PokeDexPDStat struct {
BaseStat int `json:"base_stat"`
Effort int `json:"effort"`
Stat PokeDexEntity `json:"stat"`
}
PokeDexPDType struct {
Slot int `json:"slot"`
Type PokeDexEntity `json:"type"`
}
PokeDexPokemonData struct {
BaseExperience int `json:"base_experience"`
Weight int `json:"weight"`
Height int `json:"height"`
Name string `json:"name"`
Stats []PokeDexPDStat `json:"stats"`
Types []PokeDexPDType `json:"types"`
}
PokeDexClient struct {
baseURL string
cache *pokecache.ConfigurableCache
currentOffset int
nextOffset int
ownedPookies []PokeDexPokemonData
}
)