2024-05-12 09:07:57 +03:00
|
|
|
package suggest
|
2024-05-11 16:08:28 +03:00
|
|
|
|
2024-05-12 09:07:57 +03:00
|
|
|
import (
|
|
|
|
"github.com/ekomobile/dadata/v2/api/model"
|
|
|
|
)
|
2024-05-11 16:08:28 +03:00
|
|
|
|
|
|
|
type (
|
2024-05-12 09:07:57 +03:00
|
|
|
// GeolocateParams Request struct
|
2024-05-11 16:08:28 +03:00
|
|
|
// full documentation https://confluence.hflabs.ru/pages/viewpage.action?pageId=808583277
|
2024-05-12 09:07:57 +03:00
|
|
|
GeolocateParams struct {
|
2024-05-11 16:08:28 +03:00
|
|
|
Lat string `json:"lat"` // geographic latitude
|
|
|
|
Lon string `json:"lon"` // geographic longitude
|
2024-05-12 17:56:24 +03:00
|
|
|
Count int `json:"count,omitempty"` // number of results (max 20)
|
|
|
|
RadiusMeters int `json:"radius_meters,omitempty"` // search radius in metres (max. 1000)
|
2024-05-11 16:08:28 +03:00
|
|
|
Language string `json:"language,omitempty"` // in which language to return the result (ru / en)
|
|
|
|
}
|
|
|
|
|
2024-05-12 09:07:57 +03:00
|
|
|
// GeolocateSuggestion api response for address
|
|
|
|
GeolocateSuggestion struct {
|
2024-05-11 16:08:28 +03:00
|
|
|
Value string `json:"value"`
|
|
|
|
UnrestrictedValue string `json:"unrestricted_value"`
|
|
|
|
Data *model.Address `json:"data"`
|
|
|
|
}
|
|
|
|
|
2024-05-12 09:07:57 +03:00
|
|
|
// GeolocateResponse result slice for address suggestions
|
|
|
|
GeolocateResponse struct {
|
|
|
|
Suggestions []*GeolocateSuggestion `json:"suggestions"`
|
2024-05-11 16:08:28 +03:00
|
|
|
}
|
|
|
|
)
|