csv2geo-sdk 1.5.0 → 1.5.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "csv2geo-sdk",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Node.js SDK for CSV2GEO Geocoding API — 461M+ addresses, 39 countries, 48+ endpoints. Forward, reverse, batch, places, boundaries (postcode → polygon, ancestors walk-up, children walk-down, consolidated cities), IP geolocation with county overlay, coverage, autocomplete. 3,000 free requests/day.",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
package/src/index.js CHANGED
@@ -441,12 +441,16 @@ class Client {
441
441
  return this._request('POST', '/places/batch', queryParams, body);
442
442
  }
443
443
 
444
- /** Single place by id. GET /places/{id}
444
+ /** Single place by id. GET /places/by-id/{id} (customer URL).
445
+ * The customer-facing Laravel proxy nests this under /places/by-id/{id}
446
+ * even though the underlying Go service uses /places/{id} — SDK MUST
447
+ * target the customer path. (Bug fix 1.5.1; was broken in 1.5.0 and
448
+ * earlier.)
445
449
  * options: { lang, includeOtherNames, include } */
446
450
  async placeById(placeId, options = {}) {
447
451
  const params = {};
448
452
  this._mergePlacesI18n(params, options);
449
- return this._request('GET', `/places/${encodeURIComponent(placeId)}`, params);
453
+ return this._request('GET', `/places/by-id/${encodeURIComponent(placeId)}`, params);
450
454
  }
451
455
 
452
456
  /** Internal: merge ?lang= and ?include=other_names options into params.