Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is responsible for sending of lookups to the us-autocomplete-pro-api.
func NewClient ¶
func NewClient(sender sdk.RequestSender) *Client
NewClient creates a client with the provided sender.
func (*Client) SendLookup ¶
SendBatch sends the batch of inputs, populating the output for each input if the batch was successful.
type Geolocation ¶
type Geolocation string
Lookup represents all input fields documented here: https://smartystreets.com/docs/cloud/us-autocomplete-pro-api#http-request-input-fields
const ( GeolocateCity Geolocation = "city" GeolocateNone Geolocation = "none" )
type Lookup ¶
type Lookup struct { Search string Source string MaxResults int CityFilter []string StateFilter []string ZIPFilter []string ExcludeStates []string PreferCity []string PreferState []string PreferZIP []string PreferRatio int Geolocation Geolocation Results []*Suggestion }
Lookup represents all input fields documented here: https://smartystreets.com/docs/cloud/us-autocomplete-pro-api#http-request-input-fields
type Suggestion ¶
type Suggestion struct { StreetLine string `json:"street_line"` Secondary string `json:"secondary"` City string `json:"city"` State string `json:"state"` ZIPCode string `json:"zipcode"` Entries int `json:"entries"` }
Suggestion is the primary element in the response array. Online documentation: https://smartystreets.com/docs/us-autocomplete-pro-api#http-response