Fix geolocate params types.
This commit is contained in:
parent
6dd9ffdb08
commit
6f921c2bf5
|
@ -10,8 +10,8 @@ type (
|
|||
GeolocateParams struct {
|
||||
Lat string `json:"lat"` // geographic latitude
|
||||
Lon string `json:"lon"` // geographic longitude
|
||||
Count string `json:"count,omitempty"` // number of results (max 20)
|
||||
RadiusMeters string `json:"radius_meters,omitempty"` // search radius in metres (max. 1000)
|
||||
Count int `json:"count,omitempty"` // number of results (max 20)
|
||||
RadiusMeters int `json:"radius_meters,omitempty"` // search radius in metres (max. 1000)
|
||||
Language string `json:"language,omitempty"` // in which language to return the result (ru / en)
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
@ -364,13 +363,13 @@ func (s *ApiSuggestIntegrationTest) TestGeoLocateWithCountTwo() {
|
|||
Lat: "55.878",
|
||||
Lon: "37.653",
|
||||
Language: "EN",
|
||||
Count: strconv.Itoa(reqElementCount),
|
||||
Count: reqElementCount,
|
||||
}
|
||||
|
||||
res, err := api.GeoLocate(context.Background(), ¶ms)
|
||||
|
||||
s.NoError(err)
|
||||
s.Len(res, 2)
|
||||
s.Len(res, reqElementCount)
|
||||
}
|
||||
|
||||
func (s *ApiSuggestIntegrationTest) TestGeoLocateWithRadius() {
|
||||
|
@ -380,7 +379,7 @@ func (s *ApiSuggestIntegrationTest) TestGeoLocateWithRadius() {
|
|||
Lat: "55.878",
|
||||
Lon: "37.653",
|
||||
Language: "EN",
|
||||
RadiusMeters: "100",
|
||||
RadiusMeters: 100,
|
||||
}
|
||||
|
||||
res, err := api.GeoLocate(context.Background(), ¶ms)
|
||||
|
|
Loading…
Reference in New Issue
Block a user