Add initial work on TomTom integration for routing
This commit is contained in:
parent
d536458280
commit
2a17c5c133
6 changed files with 594 additions and 0 deletions
31
tomtom/tomtom.go
Normal file
31
tomtom/tomtom.go
Normal 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()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue