Skip to content

Commit 71c359f

Browse files
committed
update location param to geographic_coordinates for prop search v2 endpoint
1 parent 3e9d025 commit 71c359f

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### v1.14.1
2+
- Update `property_v2.search` endpoint params.
3+
14
### v1.13.0
25
- Add support for `property_v2.search` endpoint.
36

parcllabs/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = "1.14.0"
1+
VERSION = "1.14.1"

parcllabs/services/properties/property_v2.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def _build_search_criteria(
144144
self,
145145
parcl_ids: list[int] | None = None,
146146
parcl_property_ids: list[int] | None = None,
147-
location: dict[str, float] | None = None,
147+
geo_coordinates: dict[str, float] | None = None,
148148
) -> dict[str, Any]:
149149
"""Build and validate search criteria."""
150150
data = {}
@@ -155,8 +155,8 @@ def _build_search_criteria(
155155
if parcl_property_ids:
156156
data["parcl_property_ids"] = parcl_property_ids
157157

158-
if location and all(k in location for k in ["latitude", "longitude", "radius"]):
159-
data.update(location)
158+
if geo_coordinates:
159+
data["geo_coordinates"] = geo_coordinates
160160

161161
return data
162162

@@ -340,7 +340,7 @@ def retrieve(
340340
data = self._build_search_criteria(
341341
parcl_ids=parcl_ids,
342342
parcl_property_ids=parcl_property_ids,
343-
location=location,
343+
geo_coordinates=location,
344344
)
345345

346346
# Build filters using all provided parameters
@@ -356,6 +356,7 @@ def retrieve(
356356
"params",
357357
"data",
358358
"location",
359+
"geo_coordinates"
359360
]:
360361
kwargs.pop(key, None)
361362

0 commit comments

Comments
 (0)