mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-13 19:25:26 +00:00
24 lines
445 B
Go
Executable File
24 lines
445 B
Go
Executable File
package example
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"go.m3o.com/location"
|
|
)
|
|
|
|
// Search for entities in a given radius
|
|
func SearchForLocations() {
|
|
locationService := location.NewLocationService(os.Getenv("M3O_API_TOKEN"))
|
|
rsp, err := locationService.Search(&location.SearchRequest{
|
|
Center: &location.Point{
|
|
Latitude: 51.511061,
|
|
Longitude: -0.120022,
|
|
},
|
|
NumEntities: 10,
|
|
Radius: 100,
|
|
Type: "bike",
|
|
})
|
|
fmt.Println(rsp, err)
|
|
}
|