Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
production
building-knowledge-centre
building-dao
Commits
e71616f5
Commit
e71616f5
authored
Oct 21, 2019
by
Marc-Andre Santune
Browse files
add get_all_buildings method
parent
3399e197
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
building_dao/building_generic.py
building_dao/building_generic.py
+10
-0
No files found.
building_dao/building_generic.py
View file @
e71616f5
...
...
@@ -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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment