google-cloud-node icon indicating copy to clipboard operation
google-cloud-node copied to clipboard

[Google Maps Places API] - Text Search missing next_page_token in response

Open shaunmitchellve opened this issue 3 months ago • 9 comments

  • which product (packages/*): packages/google-maps-places
  • OS: OSX
  • Node.js version: 21.7.2
  • npm version: 10.6.0
  • google-cloud-node version:Place2 1.6.0

Steps to reproduce

  • npm i @googlemap/places
const {PlacesClient} = require('@googlemaps/places').v1;

 let response = await placesClient.searchText(textQuery: 'something', {
 otherArgs: {
  headers: {
   'x-Goog-FieldMask': 'places.displayName',  
},}});

console.log(response);

/*
response:
[
  {
    places: [
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object]
    ],
    contextualContents: []
  },
  null,
  null
]

I would expect something like:
[
  {
    places: [
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object], [Object],
      [Object], [Object]
    ],
    contextualContents: [],
    nextPageToken: ''
  },
  null,
  null
]
*/

shaunmitchellve avatar May 24 '24 20:05 shaunmitchellve