Show routing demonstration on radar page.

This commit is contained in:
Eli Ribble 2026-02-18 04:48:12 +00:00
parent 18c7a5f84b
commit b4817546df
No known key found for this signature in database
9 changed files with 392 additions and 129 deletions

View file

@ -14,11 +14,8 @@ type TomTom struct {
}
func NewClient() *TomTom {
//logger := NewLogger(log.Logger)
//r := resty.New().SetLogger(logger).SetDebug(true)
r := resty.New().SetDebug(true)
api_key := os.Getenv("TOMTOM_API_KEY")
//r := resty.New()
r := resty.New()
return &TomTom{
APIKey: api_key,
client: r,
@ -29,3 +26,12 @@ func NewClient() *TomTom {
func (s *TomTom) Close() {
s.client.Close()
}
func (s *TomTom) SetDebug(enabled bool) {
s.client.Close()
if enabled {
s.client = resty.New().SetDebug(true)
} else {
s.client = resty.New().SetDebug(false)
}
}