Skip to main content
The Go client exposes each Baato service as a module hanging off a single Baato value, with a typed request-options struct per call.

Source on GitHub

baato/baato-go-client

Authentication

Read the token from the environment, not source.

Installation

Initialisation

Supported services: Geocoding (Search), Reverse Geocoding, Nearby Places and Directions.

Usage

Geocode — search for places by keyword

Required: Q (string) — the query to search for.
Optional: Limit (int) — cap the number of results.
Required: Lat and Lon (float) — the coordinate to look up.
Required: Type (string), Lat and Lon (float). The supported values for Type are listed on the Nearby Places page.
Required: PointsArray ([]string) as "lat,lon" pairs, and Mode (car, bike or foot).
Optional: Alternatives and Instructions (bool).
PointsArray entries are "lat,lon" strings, the reverse of the [lon, lat] order map renderers use. See coordinate order.

Next

API reference

Every parameter, with a live playground.

Errors and status codes

What to retry, and what to fix.