Commit e71616f5 authored by Marc-Andre Santune's avatar Marc-Andre Santune
Browse files

add get_all_buildings method

parent 3399e197
......@@ -45,6 +45,16 @@ class BuildingGeneric:
self._uid = res["id"]
self.fetch()
def get_all_buildings(self, **kwargs):
"""
Fetch all buildings that meet the criteria passed as kwargs
Eg: get all buildings having given centroids
"""
buildings = self._req_with_retries("get", self.settings.base_url, **kwargs)
return buildings
def fetch(self) -> None:
"""Fetch the building document"""
self._building = self._req_with_retries("get", join(self.settings.base_url, self._uid))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment