2025-06-05 16:09:14 -06:00

23 lines
361 B
Go

package pokeapi
import (
"net/http"
"time"
"git.eo13-dev.com/enordaz/gokedex/internal/pokecache"
)
type Client struct {
httpClient http.Client
cache pokecache.Cache
}
func NewClient(timeout, cacheInterval time.Duration) Client {
return Client{
httpClient: http.Client{
Timeout: timeout,
},
cache: pokecache.NewCache(cacheInterval),
}
}