Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### v1.14.1
- Update `property_v2.search` endpoint params.

### v1.13.0
- Add support for `property_v2.search` endpoint.

Expand Down
2 changes: 1 addition & 1 deletion parcllabs/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "1.14.0"
VERSION = "1.14.1"
10 changes: 5 additions & 5 deletions parcllabs/services/properties/property_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _build_search_criteria(
self,
parcl_ids: list[int] | None = None,
parcl_property_ids: list[int] | None = None,
location: dict[str, float] | None = None,
geo_coordinates: dict[str, float] | None = None,
) -> dict[str, Any]:
"""Build and validate search criteria."""
data = {}
Expand All @@ -155,8 +155,8 @@ def _build_search_criteria(
if parcl_property_ids:
data["parcl_property_ids"] = parcl_property_ids

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

return data

Expand Down Expand Up @@ -340,7 +340,7 @@ def retrieve(
data = self._build_search_criteria(
parcl_ids=parcl_ids,
parcl_property_ids=parcl_property_ids,
location=location,
geo_coordinates=location,
)

# Build filters using all provided parameters
Expand All @@ -355,7 +355,7 @@ def retrieve(
"radius",
"params",
"data",
"location",
"geo_coordinates",
]:
kwargs.pop(key, None)

Expand Down
Loading