mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-11 18:44:26 +00:00
22 lines
461 B
Go
Executable File
22 lines
461 B
Go
Executable File
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"go.m3o.com/evchargers"
|
|
)
|
|
|
|
// Search by giving a coordinate and a max distance, or bounding box and optional filters
|
|
func main() {
|
|
evchargersService := evchargers.NewEvchargersService(os.Getenv("M3O_API_TOKEN"))
|
|
rsp, err := evchargersService.Search(&evchargers.SearchRequest{
|
|
Distance: 2000,
|
|
Location: &evchargers.Coordinates{
|
|
Latitude: 51.53336351319885,
|
|
Longitude: -0.0252,
|
|
},
|
|
})
|
|
fmt.Println(rsp, err)
|
|
}
|