@forwardslashns/fws-geo-location-api 1.0.2 → 1.0.3

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.
@@ -112,7 +112,7 @@ class GeoLocationClient {
112
112
  params['adminCode1'] = options.regionCode.toUpperCase();
113
113
  }
114
114
  if (options?.searchTerm && options.searchTerm.trim().length > 0) {
115
- params['q'] = options.searchTerm.trim();
115
+ params['name_startsWith'] = options.searchTerm.trim();
116
116
  }
117
117
  const raw = await this.httpService.get(`${api_constants_js_1.GEONAMES_BASE_URL}${api_constants_js_1.GEONAMES_ENDPOINTS.SEARCH}`, params);
118
118
  const data = raw.geonames.map(city_mapper_js_1.mapCity);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forwardslashns/fws-geo-location-api",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "FWS company dedicated TypeScript wrapper around the GeoNames geolocation API. Provides countries, regions, cities, and postal codes with username rotation and restriction support.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",