places

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoCompleteOpts

type AutoCompleteOpts struct {
	Input    string `url:"input,omitempty"`
	Location string `url:"location,omitempty"`
	Radius   int    `url:"radius,omitempty"`
	Limit    int    `url:"limit,omitempty"`
}

type AutoCompleteResponse

type AutoCompleteResponse struct {
	Predictions []base.Predictions `json:"predictions"`
	Status      string             `json:"status"`
}

type DetailOpts

type DetailOpts struct {
	PlaceID string `url:"place_id,omitempty"`
}

type DetailResponse

type DetailResponse struct {
	Result base.PlaceDetailResult `json:"result"`
	Status string                 `json:"status"`
}

type Places

type Places struct {
	// contains filtered or unexported fields
}

Places api wrapper instance

func NewPlaces

func NewPlaces(base *base.Base) *Places

NewPlaces Create a new NewPlaces API wrapper

func (*Places) Autocomplete

func (g *Places) Autocomplete(ctx context.Context, req *AutoCompleteOpts) (*AutoCompleteResponse, error)

Places Search by keyword with autocomplete Return predictions according to search keyword

func (*Places) Detail

func (g *Places) Detail(ctx context.Context, req *DetailOpts) (*DetailResponse, error)

Get place detail by Id Return detail of a place by it's place_id

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL