Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Geocodes free-form text, such as an address, name, city, or region to allow you to search for Places or points of interest.
Includes the option to apply additional parameters to narrow your list of results.
You can search for places near a given position using BiasPosition
, or
filter results within a bounding box using FilterBBox
. Providing both
parameters simultaneously returns an error.
Synopsis
- data SearchPlaceIndexForText = SearchPlaceIndexForText' {}
- newSearchPlaceIndexForText :: Text -> Text -> SearchPlaceIndexForText
- searchPlaceIndexForText_filterBBox :: Lens' SearchPlaceIndexForText (Maybe (NonEmpty Double))
- searchPlaceIndexForText_biasPosition :: Lens' SearchPlaceIndexForText (Maybe (NonEmpty Double))
- searchPlaceIndexForText_filterCountries :: Lens' SearchPlaceIndexForText (Maybe (NonEmpty Text))
- searchPlaceIndexForText_maxResults :: Lens' SearchPlaceIndexForText (Maybe Natural)
- searchPlaceIndexForText_indexName :: Lens' SearchPlaceIndexForText Text
- searchPlaceIndexForText_text :: Lens' SearchPlaceIndexForText Text
- data SearchPlaceIndexForTextResponse = SearchPlaceIndexForTextResponse' {}
- newSearchPlaceIndexForTextResponse :: Int -> SearchPlaceIndexForTextSummary -> SearchPlaceIndexForTextResponse
- searchPlaceIndexForTextResponse_httpStatus :: Lens' SearchPlaceIndexForTextResponse Int
- searchPlaceIndexForTextResponse_results :: Lens' SearchPlaceIndexForTextResponse [SearchForTextResult]
- searchPlaceIndexForTextResponse_summary :: Lens' SearchPlaceIndexForTextResponse SearchPlaceIndexForTextSummary
Creating a Request
data SearchPlaceIndexForText Source #
See: newSearchPlaceIndexForText
smart constructor.
SearchPlaceIndexForText' | |
|
Instances
newSearchPlaceIndexForText Source #
:: Text | |
-> Text | |
-> SearchPlaceIndexForText |
Create a value of SearchPlaceIndexForText
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:filterBBox:SearchPlaceIndexForText'
, searchPlaceIndexForText_filterBBox
- Filters the results by returning only Places within the provided
bounding box. An optional parameter.
The first 2 bbox
parameters describe the lower southwest corner:
- The first
bbox
position is the X coordinate or longitude of the lower southwest corner. - The second
bbox
position is the Y coordinate or latitude of the lower southwest corner.
For example, bbox=xLongitudeSW&bbox=yLatitudeSW
.
The next bbox
parameters describe the upper northeast corner:
- The third
bbox
position is the X coordinate, or longitude of the upper northeast corner. - The fourth
bbox
position is the Y coordinate, or longitude of the upper northeast corner.
For example, bbox=xLongitudeNE&bbox=yLatitudeNE
$sel:biasPosition:SearchPlaceIndexForText'
, searchPlaceIndexForText_biasPosition
- Searches for results closest to the given position. An optional
parameter defined by longitude, and latitude.
- The first
bias
position is the X coordinate, or longitude. - The second
bias
position is the Y coordinate, or latitude.
For example, bias=xLongitude&bias=yLatitude
.
$sel:filterCountries:SearchPlaceIndexForText'
, searchPlaceIndexForText_filterCountries
- Limits the search to the given a list of countries/regions. An optional
parameter.
- Use the ISO 3166
3-digit country code. For example, Australia uses three upper-case
characters:
AUS
.
$sel:maxResults:SearchPlaceIndexForText'
, searchPlaceIndexForText_maxResults
- An optional parameter. The maximum number of results returned per
request.
The default: 50
$sel:indexName:SearchPlaceIndexForText'
, searchPlaceIndexForText_indexName
- The name of the place index resource you want to use for the search.
$sel:text:SearchPlaceIndexForText'
, searchPlaceIndexForText_text
- The address, name, city, or region to be used in the search. In
free-form text format. For example, 123 Any Street
.
Request Lenses
searchPlaceIndexForText_filterBBox :: Lens' SearchPlaceIndexForText (Maybe (NonEmpty Double)) Source #
Filters the results by returning only Places within the provided bounding box. An optional parameter.
The first 2 bbox
parameters describe the lower southwest corner:
- The first
bbox
position is the X coordinate or longitude of the lower southwest corner. - The second
bbox
position is the Y coordinate or latitude of the lower southwest corner.
For example, bbox=xLongitudeSW&bbox=yLatitudeSW
.
The next bbox
parameters describe the upper northeast corner:
- The third
bbox
position is the X coordinate, or longitude of the upper northeast corner. - The fourth
bbox
position is the Y coordinate, or longitude of the upper northeast corner.
For example, bbox=xLongitudeNE&bbox=yLatitudeNE
searchPlaceIndexForText_biasPosition :: Lens' SearchPlaceIndexForText (Maybe (NonEmpty Double)) Source #
Searches for results closest to the given position. An optional parameter defined by longitude, and latitude.
- The first
bias
position is the X coordinate, or longitude. - The second
bias
position is the Y coordinate, or latitude.
For example, bias=xLongitude&bias=yLatitude
.
searchPlaceIndexForText_filterCountries :: Lens' SearchPlaceIndexForText (Maybe (NonEmpty Text)) Source #
Limits the search to the given a list of countries/regions. An optional parameter.
- Use the ISO 3166
3-digit country code. For example, Australia uses three upper-case
characters:
AUS
.
searchPlaceIndexForText_maxResults :: Lens' SearchPlaceIndexForText (Maybe Natural) Source #
An optional parameter. The maximum number of results returned per request.
The default: 50
searchPlaceIndexForText_indexName :: Lens' SearchPlaceIndexForText Text Source #
The name of the place index resource you want to use for the search.
searchPlaceIndexForText_text :: Lens' SearchPlaceIndexForText Text Source #
The address, name, city, or region to be used in the search. In
free-form text format. For example, 123 Any Street
.
Destructuring the Response
data SearchPlaceIndexForTextResponse Source #
See: newSearchPlaceIndexForTextResponse
smart constructor.
SearchPlaceIndexForTextResponse' | |
|
Instances
newSearchPlaceIndexForTextResponse Source #
Create a value of SearchPlaceIndexForTextResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:SearchPlaceIndexForTextResponse'
, searchPlaceIndexForTextResponse_httpStatus
- The response's http status code.
$sel:results:SearchPlaceIndexForTextResponse'
, searchPlaceIndexForTextResponse_results
- A list of Places closest to the specified position. Each result contains
additional information about the specific point of interest.
$sel:summary:SearchPlaceIndexForTextResponse'
, searchPlaceIndexForTextResponse_summary
- Contains a summary of the request. Contains the BiasPosition
,
DataSource
, FilterBBox
, FilterCountries
, MaxResults
,
ResultBBox
, and Text
.
Response Lenses
searchPlaceIndexForTextResponse_httpStatus :: Lens' SearchPlaceIndexForTextResponse Int Source #
The response's http status code.
searchPlaceIndexForTextResponse_results :: Lens' SearchPlaceIndexForTextResponse [SearchForTextResult] Source #
A list of Places closest to the specified position. Each result contains additional information about the specific point of interest.
searchPlaceIndexForTextResponse_summary :: Lens' SearchPlaceIndexForTextResponse SearchPlaceIndexForTextSummary Source #
Contains a summary of the request. Contains the BiasPosition
,
DataSource
, FilterBBox
, FilterCountries
, MaxResults
,
ResultBBox
, and Text
.