@googlemaps/places 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -75
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
|
|
2
|
-
[//]: # "
|
|
2
|
+
[//]: # "The comments you see below are used to generate those parts of the template in later states."
|
|
3
3
|
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
|
|
4
4
|
|
|
5
|
-
# [Places API (New):
|
|
6
|
-
|
|
7
|
-
[](https://cloud.google.com/terms/launch-stages)
|
|
8
|
-
[](https://www.npmjs.org/package/@googlemaps/places)
|
|
9
|
-
|
|
5
|
+
# [Places API (New): Nodejs Client][homepage]
|
|
10
6
|
|
|
7
|
+
This library is considered to be in **preview**. This means it is still a
|
|
8
|
+
work-in-progress and under active development. Any release is subject to
|
|
9
|
+
backwards-incompatible changes at any time.
|
|
11
10
|
|
|
11
|
+
[](https://www.npmjs.org/package/@googlemaps/places)
|
|
12
12
|
|
|
13
13
|
Places API (New) client for Node.js
|
|
14
14
|
|
|
15
|
+
[//]: # "partials.introduction"
|
|
15
16
|
|
|
16
17
|
A comprehensive list of changes in each version may be found in
|
|
17
|
-
[the CHANGELOG]
|
|
18
|
+
[the CHANGELOG][homepage_changelog].
|
|
18
19
|
|
|
19
|
-
* [Places API (New)
|
|
20
|
-
* [Places API (New) Documentation]
|
|
21
|
-
* [github.com/googleapis/google-cloud-node/packages/google-maps-places](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-places)
|
|
20
|
+
* [Places API (New) Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/places/latest)
|
|
21
|
+
* [Places API (New) Documentation](https://developers.google.com/maps/documentation/places/web-service/)
|
|
22
22
|
|
|
23
23
|
Read more about the client libraries for Cloud APIs, including the older
|
|
24
24
|
Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
@@ -27,18 +27,15 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
|
27
27
|
|
|
28
28
|
**Table of contents:**
|
|
29
29
|
|
|
30
|
-
|
|
31
30
|
* [Quickstart](#quickstart)
|
|
32
31
|
* [Before you begin](#before-you-begin)
|
|
33
32
|
* [Installing the client library](#installing-the-client-library)
|
|
34
|
-
|
|
35
|
-
* [Samples](#samples)
|
|
33
|
+
|
|
36
34
|
* [Versioning](#versioning)
|
|
37
35
|
* [Contributing](#contributing)
|
|
38
36
|
* [License](#license)
|
|
39
37
|
|
|
40
38
|
## Quickstart
|
|
41
|
-
|
|
42
39
|
### Before you begin
|
|
43
40
|
|
|
44
41
|
1. [Select or create a Cloud Platform project][projects].
|
|
@@ -46,64 +43,47 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
|
46
43
|
1. [Enable the Places API (New) API][enable_api].
|
|
47
44
|
1. [Set up authentication][auth] so you can access the
|
|
48
45
|
API from your local workstation.
|
|
49
|
-
|
|
50
46
|
### Installing the client library
|
|
51
47
|
|
|
52
48
|
```bash
|
|
53
49
|
npm install @googlemaps/places
|
|
54
50
|
```
|
|
55
51
|
|
|
52
|
+
## Terms of Service
|
|
56
53
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
// Imports the Places library
|
|
62
|
-
const {PlacesClient} = require('@googlemaps/places').v1;
|
|
63
|
-
|
|
64
|
-
// Instantiates a client
|
|
65
|
-
const placesClient = new PlacesClient();
|
|
66
|
-
|
|
67
|
-
async function callSearchText() {
|
|
68
|
-
// Construct request
|
|
69
|
-
const request = {
|
|
70
|
-
textQuery,
|
|
71
|
-
};
|
|
54
|
+
`@googlemaps/places` uses Google Maps Platform services. Use of Google
|
|
55
|
+
Maps Platform services through this library is subject to the
|
|
56
|
+
[Google Maps Platform Terms of Service][gmp-tos].
|
|
72
57
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
'X-Goog-FieldMask': 'places.displayName',
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
console.log(response);
|
|
82
|
-
}
|
|
58
|
+
This library is not a Google Maps Platform Core Service.
|
|
59
|
+
Therefore, the Google Maps Platform Terms of Service (e.g., Technical
|
|
60
|
+
Support Services, Service Level Agreements, and Deprecation Policy)
|
|
61
|
+
do not apply to this library.
|
|
83
62
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
```
|
|
63
|
+
### European Economic Area (EEA) developers
|
|
87
64
|
|
|
65
|
+
If your billing address is in the European Economic Area, effective on
|
|
66
|
+
8 July 2025, the [Google Maps Platform EEA Terms of Service][gmp-tos-eea]
|
|
67
|
+
will apply to your use of the Services. Functionality varies by region.
|
|
68
|
+
[Learn more][gmp-tos-eea-faq].
|
|
88
69
|
|
|
70
|
+
[gmp-tos]: https://cloud.google.com/maps-platform/terms
|
|
71
|
+
[gmp-tos-eea]: https://cloud.google.com/terms/maps-platform/eea
|
|
72
|
+
[gmp-tos-eea-faq]: https://developers.google.com/maps/comms/eea/faq
|
|
89
73
|
|
|
90
74
|
## Samples
|
|
91
75
|
|
|
92
|
-
Samples are in the [`samples/`]
|
|
93
|
-
|
|
94
|
-
| Sample | Source Code | Try it |
|
|
95
|
-
| --------------------------- | --------------------------------- | ------ |
|
|
96
|
-
| Places.autocomplete_places | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.autocomplete_places.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.autocomplete_places.js,packages/google-maps-places/samples/README.md) |
|
|
97
|
-
| Places.get_photo_media | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.get_photo_media.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.get_photo_media.js,packages/google-maps-places/samples/README.md) |
|
|
98
|
-
| Places.get_place | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.get_place.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.get_place.js,packages/google-maps-places/samples/README.md) |
|
|
99
|
-
| Places.search_nearby | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.search_nearby.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.search_nearby.js,packages/google-maps-places/samples/README.md) |
|
|
100
|
-
| Places.search_text | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.search_text.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.search_text.js,packages/google-maps-places/samples/README.md) |
|
|
101
|
-
| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/quickstart.js,packages/google-maps-places/samples/README.md) |
|
|
102
|
-
|
|
76
|
+
Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample.
|
|
103
77
|
|
|
78
|
+
| Sample | Source Code |
|
|
79
|
+
| --------------------------- | --------------------------------- |
|
|
80
|
+
| autocomplete places | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.autocomplete_places.js) |
|
|
81
|
+
| get photo media | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.get_photo_media.js) |
|
|
82
|
+
| get place | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.get_place.js) |
|
|
83
|
+
| search nearby | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.search_nearby.js) |
|
|
84
|
+
| search text | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.search_text.js) |
|
|
85
|
+
| maps | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/snippet_metadata_google.maps.places.v1.json) |
|
|
104
86
|
|
|
105
|
-
The [Places API (New) Node.js Client API Reference][client-docs] documentation
|
|
106
|
-
also contains samples.
|
|
107
87
|
|
|
108
88
|
## Supported Node.js Versions
|
|
109
89
|
|
|
@@ -130,41 +110,29 @@ for versions compatible with Node.js 8.
|
|
|
130
110
|
|
|
131
111
|
This library follows [Semantic Versioning](http://semver.org/).
|
|
132
112
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
This library is considered to be in **preview**. This means it is still a
|
|
140
|
-
work-in-progress and under active development. Any release is subject to
|
|
141
|
-
backwards-incompatible changes at any time.
|
|
142
|
-
|
|
143
|
-
|
|
144
113
|
More Information: [Google Cloud Platform Launch Stages][launch_stages]
|
|
145
114
|
|
|
146
115
|
[launch_stages]: https://cloud.google.com/terms/launch-stages
|
|
147
116
|
|
|
148
117
|
## Contributing
|
|
149
118
|
|
|
150
|
-
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md).
|
|
119
|
+
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/CONTRIBUTING.md).
|
|
151
120
|
|
|
152
|
-
Please note that this `README.md
|
|
121
|
+
Please note that this `README.md`
|
|
153
122
|
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
|
|
154
|
-
are generated from a central template.
|
|
155
|
-
to its templates in
|
|
156
|
-
[directory](https://github.com/googleapis/synthtool).
|
|
123
|
+
are generated from a central template.
|
|
157
124
|
|
|
158
125
|
## License
|
|
159
126
|
|
|
160
127
|
Apache Version 2.0
|
|
161
128
|
|
|
162
|
-
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
|
|
129
|
+
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/LICENSE)
|
|
163
130
|
|
|
164
|
-
[client-docs]: https://cloud.google.com/nodejs/docs/reference/places/latest
|
|
165
|
-
[product-docs]: https://developers.google.com/maps/documentation/places/web-service/
|
|
166
131
|
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
|
|
167
132
|
[projects]: https://console.cloud.google.com/project
|
|
168
133
|
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
|
|
169
134
|
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=places.googleapis.com
|
|
170
135
|
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
|
|
136
|
+
[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples
|
|
137
|
+
[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/CHANGELOG.md
|
|
138
|
+
[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places
|