LocationIQ provides flexible enterprise-grade location based solutions. We work with developers, startups and enterprises worldwide serving billions of requests everyday. This page provides an overview of the technical aspects of our API and will help you get started.
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.1.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional
Put the package under your project folder and add the following in import:
import "./locationiq"
All URIs are relative to https://eu1.locationiq.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
AutocompleteApi | Autocomplete | Get /autocomplete.php | |
BalanceApi | Balance | Get /balance.php | |
DirectionsApi | Directions | Get /directions/driving/{coordinates} | Directions Service |
MatchingApi | Matching | Get /matching/driving/{coordinates} | Matching Service |
MatrixApi | Matrix | Get /matrix/driving/{coordinates} | Matrix Service |
NearestApi | Nearest | Get /nearest/driving/{coordinates} | Nearest Service |
ReverseApi | Reverse | Get /reverse.php | Reverse Geocoding |
SearchApi | Search | Get /search.php | Forward Geocoding |
- Address
- Balance
- Daybalance
- DirectionsDirections
- DirectionsDirectionsRoutes
- DirectionsMatching
- DirectionsMatrix
- DirectionsMatrixSources
- DirectionsNearest
- DirectionsNearestWaypoints
- Location
- Matchquality
- ModelError
- Namedetails
- Type: API key
Example
auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
Key: "APIKEY",
Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)