mirror of
https://github.com/imjasonh/staticmaps
synced 2026-07-18 06:47:26 +00:00
initial commit
This commit is contained in:
parent
bec142c216
commit
e0af619690
4 changed files with 305 additions and 1 deletions
21
maps_test.go
Normal file
21
maps_test.go
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
package maps
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestDirections(t *testing.T) {
|
||||
c := NewClient("")
|
||||
orig, dest := Address("111 8th Ave, NYC"), Address("170 E 92nd St, NYC")
|
||||
opts := &DirectionsOpts{
|
||||
Mode: ModeWalking,
|
||||
DepartureTime: time.Now(),
|
||||
}
|
||||
t.Logf("%s", baseURL+directions(orig, dest, opts))
|
||||
r, err := c.Directions(orig, dest, nil)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error: %v", err)
|
||||
}
|
||||
t.Logf("%v", r)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue