Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
minor - map naming
Browse files Browse the repository at this point in the history
  • Loading branch information
veonua committed Sep 25, 2023
1 parent 00ba638 commit 46808b9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bardapi/models/tools/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ class BardMapsPoint:
def __init__(self, input_list: list):
self._input_list = input_list

self.geo_position = self._input_list[11]
self.lat: float = self.geo_position[0]
self.lng: float = self.geo_position[1]

@property
def id(self) -> str:
return self._input_list[1]
Expand All @@ -21,10 +25,6 @@ def address_short(self) -> str:
# 'Dornans, 12170 Dornans Rd, Moose'
return self._input_list[50]

@property
def geo_position(self) -> list:
return self._input_list[11]

@property
def geo_position_rect(self) -> list:
return self._input_list[12]
Expand Down Expand Up @@ -57,14 +57,14 @@ def schedule(self) -> dict:
@property
def title(self) -> tuple[str, str]:
# Albertsons, "en"
return self._input_list[30] # same [30], "en"
return self._input_list[30]

def description(self) -> Optional[tuple[str, str]]:
# ['Gourmet groceries, cheeses & baked goods are available at this casual deli in a resort setting.', 'en']
return self._input_list[51]

@property
def kind(self) -> str:
def place_type(self) -> str:
# supermarket
return self._input_list[49] # same [31], "en"

Expand Down Expand Up @@ -110,4 +110,4 @@ def __str__(self) -> str:
return self.title

def markdown_text(self) -> str:
return f'# {self.title}\n\n' + '\n\n'.join([f'## {p.title[0]}\n\n{p.description()[0]}' for p in self.points])
return f'# {self.title}\n\n' + '\n\n'.join([f'## {p.title[0]}\n\n{p.description()[0]}' for p in self.points])

0 comments on commit 46808b9

Please sign in to comment.