Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2022-02-15 15:30:41 +00:00
parent d5b9efe74e
commit 3e8a30c33a
29 changed files with 1270 additions and 1213 deletions

View File

@@ -5,6 +5,7 @@ import (
)
type Place interface {
Autocomplete(*AutocompleteRequest) (*AutocompleteResponse, error)
Nearby(*NearbyRequest) (*NearbyResponse, error)
Search(*SearchRequest) (*SearchResponse, error)
}
@@ -21,7 +22,15 @@ type PlaceService struct {
client *client.Client
}
// Search for places nearby, points of interest and geographic locations
// Autocomplete queries (coming soon)
func (t *PlaceService) Autocomplete(request *AutocompleteRequest) (*AutocompleteResponse, error) {
rsp := &AutocompleteResponse{}
return rsp, t.client.Call("place", "Autocomplete", request, rsp)
}
// Find places nearby using a location
func (t *PlaceService) Nearby(request *NearbyRequest) (*NearbyResponse, error) {
rsp := &NearbyResponse{}
@@ -29,7 +38,7 @@ func (t *PlaceService) Nearby(request *NearbyRequest) (*NearbyResponse, error) {
}
//
// Search for places by text query
func (t *PlaceService) Search(request *SearchRequest) (*SearchResponse, error) {
rsp := &SearchResponse{}
@@ -37,6 +46,12 @@ func (t *PlaceService) Search(request *SearchRequest) (*SearchResponse, error) {
}
type AutocompleteRequest struct {
}
type AutocompleteResponse struct {
}
type NearbyRequest struct {
// Keyword to include in the search
Keyword string `json:"keyword"`