def get_content_from_snapshot(self, doc: DocumentSnapshot) -> Dict:
     """
     Method for getting document content from snapshot of document
     :param doc: Snapshot of document
     :return: dict with document's content
     """
     return doc.to_dict()
Ejemplo n.º 2
0
 def build_data(price: DocumentSnapshot) -> dict:
     data = price.to_dict()
     return {
         'date': data['date'],
         'code': data['code'],
         'opening_quotation': data['opening_quotation'],
         'high': data['high'],
         'turnover': data['turnover'],
         'closing_quotation': data['closing_quotation'],
         'low': data['low']
     }