Skip to content

Commit 03a7a09

Browse files
author
awstools
committed
feat(client-geo-places): Geocode, ReverseGeocode, and GetPlace APIs added Intersections and SecondaryAddresses. To use, add to the AdditionalFeatures list in your request. This provides info about nearby intersections and secondary addresses that are associated with a main address. Also added MainAddress and ParsedQuery.
1 parent b18e5aa commit 03a7a09

File tree

15 files changed

+2321
-728
lines changed

15 files changed

+2321
-728
lines changed

clients/client-geo-places/README.md

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,7 @@
66

77
AWS SDK for JavaScript GeoPlaces Client for Node.js, Browser and React Native.
88

9-
<p>
10-
The Places API enables powerful location search and geocoding capabilities for your applications, offering global coverage with rich, detailed information. Key features include:
11-
</p>
12-
<ul>
13-
<li>
14-
<p>Forward and reverse geocoding for addresses and coordinates</p>
15-
</li>
16-
<li>
17-
<p>Comprehensive place searches with detailed information, including:</p>
18-
<ul>
19-
<li>
20-
<p>Business names and addresses</p>
21-
</li>
22-
<li>
23-
<p>Contact information</p>
24-
</li>
25-
<li>
26-
<p>Hours of operation</p>
27-
</li>
28-
<li>
29-
<p>POI (Points of Interest) categories</p>
30-
</li>
31-
<li>
32-
<p>Food types for restaurants</p>
33-
</li>
34-
<li>
35-
<p>Chain affiliation for relevant businesses</p>
36-
</li>
37-
</ul>
38-
</li>
39-
<li>
40-
<p>Global data coverage with a wide range of POI categories</p>
41-
</li>
42-
<li>
43-
<p>Regular data updates to ensure accuracy and relevance</p>
44-
</li>
45-
</ul>
9+
<p> The Places API enables powerful location search and geocoding capabilities for your applications, offering global coverage with rich, detailed information. Key features include: </p> <ul> <li> <p>Forward and reverse geocoding for addresses and coordinates</p> </li> <li> <p>Comprehensive place searches with detailed information, including:</p> <ul> <li> <p>Business names and addresses</p> </li> <li> <p>Contact information</p> </li> <li> <p>Hours of operation</p> </li> <li> <p>POI (Points of Interest) categories</p> </li> <li> <p>Food types for restaurants</p> </li> <li> <p>Chain affiliation for relevant businesses</p> </li> </ul> </li> <li> <p>Global data coverage with a wide range of POI categories</p> </li> <li> <p>Regular data updates to ensure accuracy and relevance</p> </li> </ul>
4610

4711
## Installing
4812

clients/client-geo-places/src/GeoPlaces.ts

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -118,43 +118,7 @@ export interface GeoPlaces {
118118
}
119119

120120
/**
121-
* <p>
122-
* The Places API enables powerful location search and geocoding capabilities for your applications, offering global coverage with rich, detailed information. Key features include:
123-
* </p>
124-
* <ul>
125-
* <li>
126-
* <p>Forward and reverse geocoding for addresses and coordinates</p>
127-
* </li>
128-
* <li>
129-
* <p>Comprehensive place searches with detailed information, including:</p>
130-
* <ul>
131-
* <li>
132-
* <p>Business names and addresses</p>
133-
* </li>
134-
* <li>
135-
* <p>Contact information</p>
136-
* </li>
137-
* <li>
138-
* <p>Hours of operation</p>
139-
* </li>
140-
* <li>
141-
* <p>POI (Points of Interest) categories</p>
142-
* </li>
143-
* <li>
144-
* <p>Food types for restaurants</p>
145-
* </li>
146-
* <li>
147-
* <p>Chain affiliation for relevant businesses</p>
148-
* </li>
149-
* </ul>
150-
* </li>
151-
* <li>
152-
* <p>Global data coverage with a wide range of POI categories</p>
153-
* </li>
154-
* <li>
155-
* <p>Regular data updates to ensure accuracy and relevance</p>
156-
* </li>
157-
* </ul>
121+
* <p> The Places API enables powerful location search and geocoding capabilities for your applications, offering global coverage with rich, detailed information. Key features include: </p> <ul> <li> <p>Forward and reverse geocoding for addresses and coordinates</p> </li> <li> <p>Comprehensive place searches with detailed information, including:</p> <ul> <li> <p>Business names and addresses</p> </li> <li> <p>Contact information</p> </li> <li> <p>Hours of operation</p> </li> <li> <p>POI (Points of Interest) categories</p> </li> <li> <p>Food types for restaurants</p> </li> <li> <p>Chain affiliation for relevant businesses</p> </li> </ul> </li> <li> <p>Global data coverage with a wide range of POI categories</p> </li> <li> <p>Regular data updates to ensure accuracy and relevance</p> </li> </ul>
158122
* @public
159123
*/
160124
export class GeoPlaces extends GeoPlacesClient implements GeoPlaces {}

clients/client-geo-places/src/GeoPlacesClient.ts

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -286,43 +286,7 @@ export type GeoPlacesClientResolvedConfigType = __SmithyResolvedConfiguration<__
286286
export interface GeoPlacesClientResolvedConfig extends GeoPlacesClientResolvedConfigType {}
287287

288288
/**
289-
* <p>
290-
* The Places API enables powerful location search and geocoding capabilities for your applications, offering global coverage with rich, detailed information. Key features include:
291-
* </p>
292-
* <ul>
293-
* <li>
294-
* <p>Forward and reverse geocoding for addresses and coordinates</p>
295-
* </li>
296-
* <li>
297-
* <p>Comprehensive place searches with detailed information, including:</p>
298-
* <ul>
299-
* <li>
300-
* <p>Business names and addresses</p>
301-
* </li>
302-
* <li>
303-
* <p>Contact information</p>
304-
* </li>
305-
* <li>
306-
* <p>Hours of operation</p>
307-
* </li>
308-
* <li>
309-
* <p>POI (Points of Interest) categories</p>
310-
* </li>
311-
* <li>
312-
* <p>Food types for restaurants</p>
313-
* </li>
314-
* <li>
315-
* <p>Chain affiliation for relevant businesses</p>
316-
* </li>
317-
* </ul>
318-
* </li>
319-
* <li>
320-
* <p>Global data coverage with a wide range of POI categories</p>
321-
* </li>
322-
* <li>
323-
* <p>Regular data updates to ensure accuracy and relevance</p>
324-
* </li>
325-
* </ul>
289+
* <p> The Places API enables powerful location search and geocoding capabilities for your applications, offering global coverage with rich, detailed information. Key features include: </p> <ul> <li> <p>Forward and reverse geocoding for addresses and coordinates</p> </li> <li> <p>Comprehensive place searches with detailed information, including:</p> <ul> <li> <p>Business names and addresses</p> </li> <li> <p>Contact information</p> </li> <li> <p>Hours of operation</p> </li> <li> <p>POI (Points of Interest) categories</p> </li> <li> <p>Food types for restaurants</p> </li> <li> <p>Chain affiliation for relevant businesses</p> </li> </ul> </li> <li> <p>Global data coverage with a wide range of POI categories</p> </li> <li> <p>Regular data updates to ensure accuracy and relevance</p> </li> </ul>
326290
* @public
327291
*/
328292
export class GeoPlacesClient extends __Client<

clients/client-geo-places/src/commands/AutocompleteCommand.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
88
import { GeoPlacesClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GeoPlacesClient";
9-
import { AutocompleteRequest, AutocompleteRequestFilterSensitiveLog, AutocompleteResponse } from "../models/models_0";
9+
import {
10+
AutocompleteRequest,
11+
AutocompleteRequestFilterSensitiveLog,
12+
AutocompleteResponse,
13+
AutocompleteResponseFilterSensitiveLog,
14+
} from "../models/models_0";
1015
import { de_AutocompleteCommand, se_AutocompleteCommand } from "../protocols/Aws_restJson1";
1116

1217
/**
@@ -28,7 +33,7 @@ export interface AutocompleteCommandInput extends AutocompleteRequest {}
2833
export interface AutocompleteCommandOutput extends AutocompleteResponse, __MetadataBearer {}
2934

3035
/**
31-
* <p>The autocomplete operation speeds up and increases the accuracy of entering addresses by providing a list of address candidates matching a partially entered address. Results are sorted from most to least matching. Filtering and biasing can be used to increase the relevance of the results if additional search context is known</p>
36+
* <p> <code>Autocomplete</code> completes potential places and addresses as the user types, based on the partial input. The API enhances the efficiency and accuracy of address by completing query based on a few entered keystrokes. It helps you by completing partial queries with valid address completion. Also, the API supports the filtering of results based on geographic location, country, or specific place types, and can be tailored using optional parameters like language and political views.</p>
3237
* @example
3338
* Use a bare-bones client and the command you need to make an API call.
3439
* ```javascript
@@ -97,7 +102,7 @@ export interface AutocompleteCommandOutput extends AutocompleteResponse, __Metad
97102
* // PostalCode: "STRING_VALUE",
98103
* // Block: "STRING_VALUE",
99104
* // SubBlock: "STRING_VALUE",
100-
* // Intersection: [ // IntersectionList
105+
* // Intersection: [ // IntersectionStreetList
101106
* // "STRING_VALUE",
102107
* // ],
103108
* // Street: "STRING_VALUE",
@@ -115,6 +120,11 @@ export interface AutocompleteCommandOutput extends AutocompleteResponse, __Metad
115120
* // ],
116121
* // AddressNumber: "STRING_VALUE",
117122
* // Building: "STRING_VALUE",
123+
* // SecondaryAddressComponents: [ // SecondaryAddressComponentList
124+
* // { // SecondaryAddressComponent
125+
* // Number: "STRING_VALUE", // required
126+
* // },
127+
* // ],
118128
* // },
119129
* // Distance: Number("long"),
120130
* // Language: "STRING_VALUE",
@@ -208,7 +218,7 @@ export class AutocompleteCommand extends $Command
208218
})
209219
.s("PlacesService", "Autocomplete", {})
210220
.n("GeoPlacesClient", "AutocompleteCommand")
211-
.f(AutocompleteRequestFilterSensitiveLog, void 0)
221+
.f(AutocompleteRequestFilterSensitiveLog, AutocompleteResponseFilterSensitiveLog)
212222
.ser(se_AutocompleteCommand)
213223
.de(de_AutocompleteCommand)
214224
.build() {

clients/client-geo-places/src/commands/GeocodeCommand.ts

Lines changed: 155 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ export interface GeocodeCommandInput extends GeocodeRequest {}
3333
export interface GeocodeCommandOutput extends GeocodeResponse, __MetadataBearer {}
3434

3535
/**
36-
* <p>The <code>Geocode</code> action allows you to obtain coordinates, addresses, and other
37-
* information about places.</p>
36+
* <p> <code>Geocode</code> converts a textual address or place into geographic coordinates. You can obtain geographic coordinates, address component, and other related information. It supports flexible queries, including free-form text or structured queries with components like street names, postal codes, and regions. The Geocode API can also provide additional features such as time zone information and the inclusion of political views.</p>
3837
* @example
3938
* Use a bare-bones client and the command you need to make an API call.
4039
* ```javascript
@@ -103,7 +102,7 @@ export interface GeocodeCommandOutput extends GeocodeResponse, __MetadataBearer
103102
* // PostalCode: "STRING_VALUE",
104103
* // Block: "STRING_VALUE",
105104
* // SubBlock: "STRING_VALUE",
106-
* // Intersection: [ // IntersectionList
105+
* // Intersection: [ // IntersectionStreetList
107106
* // "STRING_VALUE",
108107
* // ],
109108
* // Street: "STRING_VALUE",
@@ -121,6 +120,11 @@ export interface GeocodeCommandOutput extends GeocodeResponse, __MetadataBearer
121120
* // ],
122121
* // AddressNumber: "STRING_VALUE",
123122
* // Building: "STRING_VALUE",
123+
* // SecondaryAddressComponents: [ // SecondaryAddressComponentList
124+
* // { // SecondaryAddressComponent
125+
* // Number: "STRING_VALUE", // required
126+
* // },
127+
* // ],
124128
* // },
125129
* // AddressNumberCorrected: true || false,
126130
* // PostalCodeDetails: [ // PostalCodeDetailsList
@@ -190,9 +194,157 @@ export interface GeocodeCommandOutput extends GeocodeResponse, __MetadataBearer
190194
* // ],
191195
* // AddressNumber: Number("double"),
192196
* // Building: Number("double"),
197+
* // SecondaryAddressComponents: [ // SecondaryAddressComponentMatchScoreList
198+
* // { // SecondaryAddressComponentMatchScore
199+
* // Number: Number("double"),
200+
* // },
201+
* // ],
193202
* // },
194203
* // },
195204
* // },
205+
* // ParsedQuery: { // GeocodeParsedQuery
206+
* // Title: [ // ParsedQueryComponentList
207+
* // { // ParsedQueryComponent
208+
* // StartIndex: Number("int"),
209+
* // EndIndex: Number("int"),
210+
* // Value: "STRING_VALUE",
211+
* // QueryComponent: "STRING_VALUE",
212+
* // },
213+
* // ],
214+
* // Address: { // GeocodeParsedQueryAddressComponents
215+
* // Country: [
216+
* // {
217+
* // StartIndex: Number("int"),
218+
* // EndIndex: Number("int"),
219+
* // Value: "STRING_VALUE",
220+
* // QueryComponent: "STRING_VALUE",
221+
* // },
222+
* // ],
223+
* // Region: [
224+
* // {
225+
* // StartIndex: Number("int"),
226+
* // EndIndex: Number("int"),
227+
* // Value: "STRING_VALUE",
228+
* // QueryComponent: "STRING_VALUE",
229+
* // },
230+
* // ],
231+
* // SubRegion: [
232+
* // {
233+
* // StartIndex: Number("int"),
234+
* // EndIndex: Number("int"),
235+
* // Value: "STRING_VALUE",
236+
* // QueryComponent: "STRING_VALUE",
237+
* // },
238+
* // ],
239+
* // Locality: [
240+
* // {
241+
* // StartIndex: Number("int"),
242+
* // EndIndex: Number("int"),
243+
* // Value: "STRING_VALUE",
244+
* // QueryComponent: "STRING_VALUE",
245+
* // },
246+
* // ],
247+
* // District: "<ParsedQueryComponentList>",
248+
* // SubDistrict: "<ParsedQueryComponentList>",
249+
* // PostalCode: "<ParsedQueryComponentList>",
250+
* // Block: "<ParsedQueryComponentList>",
251+
* // SubBlock: "<ParsedQueryComponentList>",
252+
* // Street: "<ParsedQueryComponentList>",
253+
* // AddressNumber: "<ParsedQueryComponentList>",
254+
* // Building: "<ParsedQueryComponentList>",
255+
* // SecondaryAddressComponents: [ // ParsedQuerySecondaryAddressComponentList
256+
* // { // ParsedQuerySecondaryAddressComponent
257+
* // StartIndex: Number("int"), // required
258+
* // EndIndex: Number("int"), // required
259+
* // Value: "STRING_VALUE", // required
260+
* // Number: "STRING_VALUE", // required
261+
* // Designator: "STRING_VALUE", // required
262+
* // },
263+
* // ],
264+
* // },
265+
* // },
266+
* // Intersections: [ // IntersectionList
267+
* // { // Intersection
268+
* // PlaceId: "STRING_VALUE", // required
269+
* // Title: "STRING_VALUE", // required
270+
* // Address: {
271+
* // Label: "STRING_VALUE",
272+
* // Country: {
273+
* // Code2: "STRING_VALUE",
274+
* // Code3: "STRING_VALUE",
275+
* // Name: "STRING_VALUE",
276+
* // },
277+
* // Region: {
278+
* // Code: "STRING_VALUE",
279+
* // Name: "STRING_VALUE",
280+
* // },
281+
* // SubRegion: {
282+
* // Code: "STRING_VALUE",
283+
* // Name: "STRING_VALUE",
284+
* // },
285+
* // Locality: "STRING_VALUE",
286+
* // District: "STRING_VALUE",
287+
* // SubDistrict: "STRING_VALUE",
288+
* // PostalCode: "STRING_VALUE",
289+
* // Block: "STRING_VALUE",
290+
* // SubBlock: "STRING_VALUE",
291+
* // Intersection: [
292+
* // "STRING_VALUE",
293+
* // ],
294+
* // Street: "STRING_VALUE",
295+
* // StreetComponents: [
296+
* // {
297+
* // BaseName: "STRING_VALUE",
298+
* // Type: "STRING_VALUE",
299+
* // TypePlacement: "STRING_VALUE",
300+
* // TypeSeparator: "STRING_VALUE",
301+
* // Prefix: "STRING_VALUE",
302+
* // Suffix: "STRING_VALUE",
303+
* // Direction: "STRING_VALUE",
304+
* // Language: "STRING_VALUE",
305+
* // },
306+
* // ],
307+
* // AddressNumber: "STRING_VALUE",
308+
* // Building: "STRING_VALUE",
309+
* // SecondaryAddressComponents: [
310+
* // {
311+
* // Number: "STRING_VALUE", // required
312+
* // },
313+
* // ],
314+
* // },
315+
* // Position: [
316+
* // Number("double"),
317+
* // ],
318+
* // Distance: Number("long"),
319+
* // RouteDistance: Number("long"),
320+
* // MapView: [
321+
* // Number("double"),
322+
* // ],
323+
* // AccessPoints: [
324+
* // {
325+
* // Position: "<Position>",
326+
* // },
327+
* // ],
328+
* // },
329+
* // ],
330+
* // MainAddress: { // RelatedPlace
331+
* // PlaceId: "STRING_VALUE", // required
332+
* // PlaceType: "STRING_VALUE", // required
333+
* // Title: "STRING_VALUE", // required
334+
* // Address: "<Address>",
335+
* // Position: "<Position>",
336+
* // AccessPoints: "<AccessPointList>",
337+
* // },
338+
* // SecondaryAddresses: [ // RelatedPlaceList
339+
* // {
340+
* // PlaceId: "STRING_VALUE", // required
341+
* // PlaceType: "STRING_VALUE", // required
342+
* // Title: "STRING_VALUE", // required
343+
* // Address: "<Address>",
344+
* // Position: "<Position>",
345+
* // AccessPoints: "<AccessPointList>",
346+
* // },
347+
* // ],
196348
* // },
197349
* // ],
198350
* // };

0 commit comments

Comments
 (0)