Documentation
¶
Index ¶
- type Client
- func (a *Client) SetTransport(transport runtime.ClientTransport)
- func (a *Client) V1AddressGeocode(params *V1AddressGeocodeParams, authInfo runtime.ClientAuthInfoWriter, ...) (*V1AddressGeocodeOK, error)
- func (a *Client) V1AddressStructuredGeocode(params *V1AddressStructuredGeocodeParams, ...) (*V1AddressStructuredGeocodeOK, error)
- type ClientOption
- type ClientService
- type V1AddressGeocodeOK
- type V1AddressGeocodeParams
- func NewV1AddressGeocodeParams() *V1AddressGeocodeParams
- func NewV1AddressGeocodeParamsWithContext(ctx context.Context) *V1AddressGeocodeParams
- func NewV1AddressGeocodeParamsWithHTTPClient(client *http.Client) *V1AddressGeocodeParams
- func NewV1AddressGeocodeParamsWithTimeout(timeout time.Duration) *V1AddressGeocodeParams
- func (o *V1AddressGeocodeParams) SetContext(ctx context.Context)
- func (o *V1AddressGeocodeParams) SetDefaults()
- func (o *V1AddressGeocodeParams) SetHTTPClient(client *http.Client)
- func (o *V1AddressGeocodeParams) SetMinConfidence(minConfidence *int64)
- func (o *V1AddressGeocodeParams) SetQ(q string)
- func (o *V1AddressGeocodeParams) SetTimeout(timeout time.Duration)
- func (o *V1AddressGeocodeParams) WithContext(ctx context.Context) *V1AddressGeocodeParams
- func (o *V1AddressGeocodeParams) WithDefaults() *V1AddressGeocodeParams
- func (o *V1AddressGeocodeParams) WithHTTPClient(client *http.Client) *V1AddressGeocodeParams
- func (o *V1AddressGeocodeParams) WithMinConfidence(minConfidence *int64) *V1AddressGeocodeParams
- func (o *V1AddressGeocodeParams) WithQ(q string) *V1AddressGeocodeParams
- func (o *V1AddressGeocodeParams) WithTimeout(timeout time.Duration) *V1AddressGeocodeParams
- func (o *V1AddressGeocodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type V1AddressGeocodeReader
- type V1AddressStructuredGeocodeOK
- type V1AddressStructuredGeocodeParams
- func NewV1AddressStructuredGeocodeParams() *V1AddressStructuredGeocodeParams
- func NewV1AddressStructuredGeocodeParamsWithContext(ctx context.Context) *V1AddressStructuredGeocodeParams
- func NewV1AddressStructuredGeocodeParamsWithHTTPClient(client *http.Client) *V1AddressStructuredGeocodeParams
- func NewV1AddressStructuredGeocodeParamsWithTimeout(timeout time.Duration) *V1AddressStructuredGeocodeParams
- func (o *V1AddressStructuredGeocodeParams) SetCity(city *string)
- func (o *V1AddressStructuredGeocodeParams) SetContext(ctx context.Context)
- func (o *V1AddressStructuredGeocodeParams) SetDefaults()
- func (o *V1AddressStructuredGeocodeParams) SetHTTPClient(client *http.Client)
- func (o *V1AddressStructuredGeocodeParams) SetMinConfidence(minConfidence *int64)
- func (o *V1AddressStructuredGeocodeParams) SetPostalCode(postalCode *string)
- func (o *V1AddressStructuredGeocodeParams) SetState(state *string)
- func (o *V1AddressStructuredGeocodeParams) SetStreetAddress(streetAddress string)
- func (o *V1AddressStructuredGeocodeParams) SetTimeout(timeout time.Duration)
- func (o *V1AddressStructuredGeocodeParams) WithCity(city *string) *V1AddressStructuredGeocodeParams
- func (o *V1AddressStructuredGeocodeParams) WithContext(ctx context.Context) *V1AddressStructuredGeocodeParams
- func (o *V1AddressStructuredGeocodeParams) WithDefaults() *V1AddressStructuredGeocodeParams
- func (o *V1AddressStructuredGeocodeParams) WithHTTPClient(client *http.Client) *V1AddressStructuredGeocodeParams
- func (o *V1AddressStructuredGeocodeParams) WithMinConfidence(minConfidence *int64) *V1AddressStructuredGeocodeParams
- func (o *V1AddressStructuredGeocodeParams) WithPostalCode(postalCode *string) *V1AddressStructuredGeocodeParams
- func (o *V1AddressStructuredGeocodeParams) WithState(state *string) *V1AddressStructuredGeocodeParams
- func (o *V1AddressStructuredGeocodeParams) WithStreetAddress(streetAddress string) *V1AddressStructuredGeocodeParams
- func (o *V1AddressStructuredGeocodeParams) WithTimeout(timeout time.Duration) *V1AddressStructuredGeocodeParams
- func (o *V1AddressStructuredGeocodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type V1AddressStructuredGeocodeReader
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 for address API
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
func (*Client) V1AddressGeocode ¶
func (a *Client) V1AddressGeocode(params *V1AddressGeocodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1AddressGeocodeOK, error)
V1AddressGeocode geocodes an unstructured address string **Description**<br><br>
Geocode a single address. This parses the input address and matches it against our records to produce the geocoded result.
This does a best-attempt to geocode the given address in the face of human errors in the input data. This can be the wrong city ("New York City" instead of "New York") a missing postal code, a misspelled street name, house numbers that don't exist, etc.
As more corrections are needed, the certainty in the result drops. This can be tuned with a minimum certainty parameter. If our confidence in the result is less than the minimum certainty, it will not be returned. The default is 30. 30 was chosen to be robust against unclean data without returning results that are unlikely to be true. We don't recommend setting this parameter above 90 because exact matching is too restrictive for the mistakes that people typically make when writing addresses -- even people writing their own addresses will make mistakes that are never corrected.
**Lookup cost**
This query requires an account. Please sign up at https://geo.codes/signup and get your API key at https://geo.codes/account/api
One query counts as one lookup. It only costs a query if it returns data. If you have exceeded your account quota, the request will not succeed.
func (*Client) V1AddressStructuredGeocode ¶
func (a *Client) V1AddressStructuredGeocode(params *V1AddressStructuredGeocodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1AddressStructuredGeocodeOK, error)
V1AddressStructuredGeocode geocodes structured addresses **Description**<br>
Geocode a single structured address. This takes address components (street, city, state, etc) and matches it against our records to produce the geocoded result.
This does a best-attempt to geocode the given address in the face of human errors in the input data. This can be the wrong city ("New York City" instead of "New York") a missing postal code, a misspelled street name, house numbers that don't exist, etc.
As more corrections are needed, the certainty in the result drops. This can be tuned with a minimum certainty parameter. If our confidence in the result is less than the minimum certainty, it will not be returned. The default is 30%. 30% was chosen to be robust against unclean data without returning results that are unlikely to be true. We don't recommend setting this parameter above 90% because exact matching is too restrictive for the mistakes that people typically make when writing addresses -- even people writing their own addresses will make mistakes that are never corrected because they Just Work.
**Lookup cost**<br>
This query requires an account. Please sign up at https://geo.codes/signup and get your API key at https://geo.codes/account/api
One query counts as one lookup. It only costs a query if it returns data. If you have exceeded your account quota, the request will not succeed.
type ClientOption ¶
type ClientOption func(*runtime.ClientOperation)
ClientOption is the option for Client methods
type ClientService ¶
type ClientService interface { V1AddressGeocode(params *V1AddressGeocodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1AddressGeocodeOK, error) V1AddressStructuredGeocode(params *V1AddressStructuredGeocodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1AddressStructuredGeocodeOK, error) SetTransport(transport runtime.ClientTransport) }
ClientService is the interface for Client methods
func New ¶
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService
New creates a new address API client.
type V1AddressGeocodeOK ¶
V1AddressGeocodeOK describes a response with status code 200, with default header values.
OK
func NewV1AddressGeocodeOK ¶
func NewV1AddressGeocodeOK() *V1AddressGeocodeOK
NewV1AddressGeocodeOK creates a V1AddressGeocodeOK with default headers values
func (*V1AddressGeocodeOK) Error ¶
func (o *V1AddressGeocodeOK) Error() string
func (*V1AddressGeocodeOK) GetPayload ¶
func (o *V1AddressGeocodeOK) GetPayload() *models.Geocoding
type V1AddressGeocodeParams ¶
type V1AddressGeocodeParams struct { /* MinConfidence. The minimum confidence in the results required to return an address, as a percentage between 0 and 100. Default: 30. To accept only exact data matches, choose 100. To be as permissive as possible, set it to 0. We don't recommend setting this higher than 90. It is very common for people to write their own addresses in ways that deviate from the exact match. */ MinConfidence *int64 /* Q. The unstructured address to geocode. Expected to be roughly the format that is used by the USPS to deliver mail. */ Q string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
V1AddressGeocodeParams contains all the parameters to send to the API endpoint
for the v1 address geocode operation. Typically these are written to a http.Request.
func NewV1AddressGeocodeParams ¶
func NewV1AddressGeocodeParams() *V1AddressGeocodeParams
NewV1AddressGeocodeParams creates a new V1AddressGeocodeParams object, with the default timeout for this client.
Default values are not hydrated, since defaults are normally applied by the API server side.
To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewV1AddressGeocodeParamsWithContext ¶
func NewV1AddressGeocodeParamsWithContext(ctx context.Context) *V1AddressGeocodeParams
NewV1AddressGeocodeParamsWithContext creates a new V1AddressGeocodeParams object with the ability to set a context for a request.
func NewV1AddressGeocodeParamsWithHTTPClient ¶
func NewV1AddressGeocodeParamsWithHTTPClient(client *http.Client) *V1AddressGeocodeParams
NewV1AddressGeocodeParamsWithHTTPClient creates a new V1AddressGeocodeParams object with the ability to set a custom HTTPClient for a request.
func NewV1AddressGeocodeParamsWithTimeout ¶
func NewV1AddressGeocodeParamsWithTimeout(timeout time.Duration) *V1AddressGeocodeParams
NewV1AddressGeocodeParamsWithTimeout creates a new V1AddressGeocodeParams object with the ability to set a timeout on a request.
func (*V1AddressGeocodeParams) SetContext ¶
func (o *V1AddressGeocodeParams) SetContext(ctx context.Context)
SetContext adds the context to the v1 address geocode params
func (*V1AddressGeocodeParams) SetDefaults ¶
func (o *V1AddressGeocodeParams) SetDefaults()
SetDefaults hydrates default values in the v1 address geocode params (not the query body).
All values with no default are reset to their zero value.
func (*V1AddressGeocodeParams) SetHTTPClient ¶
func (o *V1AddressGeocodeParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the v1 address geocode params
func (*V1AddressGeocodeParams) SetMinConfidence ¶
func (o *V1AddressGeocodeParams) SetMinConfidence(minConfidence *int64)
SetMinConfidence adds the minConfidence to the v1 address geocode params
func (*V1AddressGeocodeParams) SetQ ¶
func (o *V1AddressGeocodeParams) SetQ(q string)
SetQ adds the q to the v1 address geocode params
func (*V1AddressGeocodeParams) SetTimeout ¶
func (o *V1AddressGeocodeParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the v1 address geocode params
func (*V1AddressGeocodeParams) WithContext ¶
func (o *V1AddressGeocodeParams) WithContext(ctx context.Context) *V1AddressGeocodeParams
WithContext adds the context to the v1 address geocode params
func (*V1AddressGeocodeParams) WithDefaults ¶
func (o *V1AddressGeocodeParams) WithDefaults() *V1AddressGeocodeParams
WithDefaults hydrates default values in the v1 address geocode params (not the query body).
All values with no default are reset to their zero value.
func (*V1AddressGeocodeParams) WithHTTPClient ¶
func (o *V1AddressGeocodeParams) WithHTTPClient(client *http.Client) *V1AddressGeocodeParams
WithHTTPClient adds the HTTPClient to the v1 address geocode params
func (*V1AddressGeocodeParams) WithMinConfidence ¶
func (o *V1AddressGeocodeParams) WithMinConfidence(minConfidence *int64) *V1AddressGeocodeParams
WithMinConfidence adds the minConfidence to the v1 address geocode params
func (*V1AddressGeocodeParams) WithQ ¶
func (o *V1AddressGeocodeParams) WithQ(q string) *V1AddressGeocodeParams
WithQ adds the q to the v1 address geocode params
func (*V1AddressGeocodeParams) WithTimeout ¶
func (o *V1AddressGeocodeParams) WithTimeout(timeout time.Duration) *V1AddressGeocodeParams
WithTimeout adds the timeout to the v1 address geocode params
func (*V1AddressGeocodeParams) WriteToRequest ¶
func (o *V1AddressGeocodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type V1AddressGeocodeReader ¶
type V1AddressGeocodeReader struct {
// contains filtered or unexported fields
}
V1AddressGeocodeReader is a Reader for the V1AddressGeocode structure.
func (*V1AddressGeocodeReader) ReadResponse ¶
func (o *V1AddressGeocodeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type V1AddressStructuredGeocodeOK ¶
V1AddressStructuredGeocodeOK describes a response with status code 200, with default header values.
OK
func NewV1AddressStructuredGeocodeOK ¶
func NewV1AddressStructuredGeocodeOK() *V1AddressStructuredGeocodeOK
NewV1AddressStructuredGeocodeOK creates a V1AddressStructuredGeocodeOK with default headers values
func (*V1AddressStructuredGeocodeOK) Error ¶
func (o *V1AddressStructuredGeocodeOK) Error() string
func (*V1AddressStructuredGeocodeOK) GetPayload ¶
func (o *V1AddressStructuredGeocodeOK) GetPayload() *models.Geocoding
type V1AddressStructuredGeocodeParams ¶
type V1AddressStructuredGeocodeParams struct { /* City. The city. Not required, but it's highly recommended that you add either the city or postal_code fields. */ City *string /* MinConfidence. The minimum confidence in the results required to return an address, as a percentage between 0 and 100. Default: 30. To accept only exact data matches, choose 100. To be as permissive as possible, set it to 0. We don't recommend setting this higher than 90. It is very common for people to write their own addresses in ways that deviate from the exact match. */ MinConfidence *int64 /* PostalCode. The postal code, for example, a ZIP code. Not required, but if this is not present, we recommend adding the city and the state for best results. */ PostalCode *string /* State. The state with the address. Not required, but it's highly recommended that you add the postal_code if the state is not present. */ State *string /* StreetAddress. The street address line, including the number and street type. */ StreetAddress string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
V1AddressStructuredGeocodeParams contains all the parameters to send to the API endpoint
for the v1 address structured geocode operation. Typically these are written to a http.Request.
func NewV1AddressStructuredGeocodeParams ¶
func NewV1AddressStructuredGeocodeParams() *V1AddressStructuredGeocodeParams
NewV1AddressStructuredGeocodeParams creates a new V1AddressStructuredGeocodeParams object, with the default timeout for this client.
Default values are not hydrated, since defaults are normally applied by the API server side.
To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewV1AddressStructuredGeocodeParamsWithContext ¶
func NewV1AddressStructuredGeocodeParamsWithContext(ctx context.Context) *V1AddressStructuredGeocodeParams
NewV1AddressStructuredGeocodeParamsWithContext creates a new V1AddressStructuredGeocodeParams object with the ability to set a context for a request.
func NewV1AddressStructuredGeocodeParamsWithHTTPClient ¶
func NewV1AddressStructuredGeocodeParamsWithHTTPClient(client *http.Client) *V1AddressStructuredGeocodeParams
NewV1AddressStructuredGeocodeParamsWithHTTPClient creates a new V1AddressStructuredGeocodeParams object with the ability to set a custom HTTPClient for a request.
func NewV1AddressStructuredGeocodeParamsWithTimeout ¶
func NewV1AddressStructuredGeocodeParamsWithTimeout(timeout time.Duration) *V1AddressStructuredGeocodeParams
NewV1AddressStructuredGeocodeParamsWithTimeout creates a new V1AddressStructuredGeocodeParams object with the ability to set a timeout on a request.
func (*V1AddressStructuredGeocodeParams) SetCity ¶
func (o *V1AddressStructuredGeocodeParams) SetCity(city *string)
SetCity adds the city to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) SetContext ¶
func (o *V1AddressStructuredGeocodeParams) SetContext(ctx context.Context)
SetContext adds the context to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) SetDefaults ¶
func (o *V1AddressStructuredGeocodeParams) SetDefaults()
SetDefaults hydrates default values in the v1 address structured geocode params (not the query body).
All values with no default are reset to their zero value.
func (*V1AddressStructuredGeocodeParams) SetHTTPClient ¶
func (o *V1AddressStructuredGeocodeParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) SetMinConfidence ¶
func (o *V1AddressStructuredGeocodeParams) SetMinConfidence(minConfidence *int64)
SetMinConfidence adds the minConfidence to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) SetPostalCode ¶
func (o *V1AddressStructuredGeocodeParams) SetPostalCode(postalCode *string)
SetPostalCode adds the postalCode to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) SetState ¶
func (o *V1AddressStructuredGeocodeParams) SetState(state *string)
SetState adds the state to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) SetStreetAddress ¶
func (o *V1AddressStructuredGeocodeParams) SetStreetAddress(streetAddress string)
SetStreetAddress adds the streetAddress to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) SetTimeout ¶
func (o *V1AddressStructuredGeocodeParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) WithCity ¶
func (o *V1AddressStructuredGeocodeParams) WithCity(city *string) *V1AddressStructuredGeocodeParams
WithCity adds the city to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) WithContext ¶
func (o *V1AddressStructuredGeocodeParams) WithContext(ctx context.Context) *V1AddressStructuredGeocodeParams
WithContext adds the context to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) WithDefaults ¶
func (o *V1AddressStructuredGeocodeParams) WithDefaults() *V1AddressStructuredGeocodeParams
WithDefaults hydrates default values in the v1 address structured geocode params (not the query body).
All values with no default are reset to their zero value.
func (*V1AddressStructuredGeocodeParams) WithHTTPClient ¶
func (o *V1AddressStructuredGeocodeParams) WithHTTPClient(client *http.Client) *V1AddressStructuredGeocodeParams
WithHTTPClient adds the HTTPClient to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) WithMinConfidence ¶
func (o *V1AddressStructuredGeocodeParams) WithMinConfidence(minConfidence *int64) *V1AddressStructuredGeocodeParams
WithMinConfidence adds the minConfidence to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) WithPostalCode ¶
func (o *V1AddressStructuredGeocodeParams) WithPostalCode(postalCode *string) *V1AddressStructuredGeocodeParams
WithPostalCode adds the postalCode to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) WithState ¶
func (o *V1AddressStructuredGeocodeParams) WithState(state *string) *V1AddressStructuredGeocodeParams
WithState adds the state to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) WithStreetAddress ¶
func (o *V1AddressStructuredGeocodeParams) WithStreetAddress(streetAddress string) *V1AddressStructuredGeocodeParams
WithStreetAddress adds the streetAddress to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) WithTimeout ¶
func (o *V1AddressStructuredGeocodeParams) WithTimeout(timeout time.Duration) *V1AddressStructuredGeocodeParams
WithTimeout adds the timeout to the v1 address structured geocode params
func (*V1AddressStructuredGeocodeParams) WriteToRequest ¶
func (o *V1AddressStructuredGeocodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type V1AddressStructuredGeocodeReader ¶
type V1AddressStructuredGeocodeReader struct {
// contains filtered or unexported fields
}
V1AddressStructuredGeocodeReader is a Reader for the V1AddressStructuredGeocode structure.
func (*V1AddressStructuredGeocodeReader) ReadResponse ¶
func (o *V1AddressStructuredGeocodeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.