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 batches of addresses to the us-street-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 int
const ( GeolocateCity Geolocation = iota GeolocateState GeolocateNone )
type Lookup ¶
type Lookup struct { Prefix string MaxSuggestions int CityFilter []string StateFilter []string Preferences []string Geolocation Geolocation PreferRatio float64 Results []*Suggestion }
Lookup represents all input fields documented here: https://smartystreets.com/docs/us-autocomplete-api#http-request-input-fields
type Suggestion ¶
type Suggestion struct { Text string `json:"text"` StreetLine string `json:"street_line"` City string `json:"city"` State string `json:"state"` }
Suggestion is the primary element in the response array. Online documentation: https://smartystreets.com/docs/us-autocomplete-api#http-response
Click to show internal directories.
Click to hide internal directories.