Пример #1
0
    def by_id(self, recording_id):
        data = self._collection.find_one(objectid.ObjectId(recording_id))
        if data is None:
            return None

        return json_marshalling.unmarshall_recording(data)
Пример #2
0
 def all(self):
     recordings = []
     for recording_data in self._collection.find():
         r = json_marshalling.unmarshall_recording(recording_data)
         recordings.append(r)
     return recordings