Add initial work on TomTom integration for routing

This commit is contained in:
Eli Ribble 2026-02-17 16:23:56 +00:00
parent d536458280
commit 2a17c5c133
No known key found for this signature in database
6 changed files with 594 additions and 0 deletions

31
tomtom/tomtom.go Normal file
View file

@ -0,0 +1,31 @@
package tomtom
import (
"os"
"resty.dev/v3"
)
type TomTom struct {
APIKey string
client *resty.Client
urlBase string
}
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()
return &TomTom{
APIKey: api_key,
client: r,
urlBase: "api.tomtom.com",
}
}
func (s *TomTom) Close() {
s.client.Close()
}