Commit 9ef8e9a9 authored by unknown's avatar unknown
Browse files

add str and repr methods

parent 9acd8d5d
......@@ -59,6 +59,23 @@ class BuildingGeneric:
def __setitem__(self, key, item):
self._building[key] = item
def __str__(self):
return "id: {id}, address: {address}, country_code: {country_code}, already_exists: {already_exists}".format(
id=self._building["id"],
address=self._building["address"]["unstructured_query"],
country_code=self._building["address"]["country_code"],
already_exists=self._building["already_exists"]
)
def __repr__(self):
return "id: {id}, address: {address}, country_code: {country_code}, already_exists: {already_exists}".format(
id=self._building["id"],
address=self._building["address"]["unstructured_query"],
country_code=self._building["address"]["country_code"],
already_exists=self._building["already_exists"]
)
# ----------------- Building level ---------------------
def post_building(self, payload) -> None:
"""Post a new building"""
......
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