Documentation ¶
Index ¶
Constants ¶
Variables ¶
View Source
var CacheSettings = Settings{ CustomExpire: 0, UseCache: true, }
CacheSettings are user settings for cache expiration.
Functions ¶
Types ¶
type PokeapiClient ¶
type PokeapiClient struct {
// contains filtered or unexported fields
}
PokeapiClient is the client for pokeapi
func NewPokeapiClient ¶
func NewPokeapiClient() *PokeapiClient
NewPokeapiClient creates a new PokeapiClient
func (*PokeapiClient) FetchPokemon ¶
func (hc *PokeapiClient) FetchPokemon(p interface{}) (model.Pokemon, error)
FetchPokemon retrieves the Resource as per provided Pokemon parameter
func (*PokeapiClient) SetTimeout ¶
func (hc *PokeapiClient) SetTimeout(d time.Duration)
SetTimeout overrides the default ClientTimeout
Click to show internal directories.
Click to hide internal directories.