def get_capture(self, cid): if cid is None: raise ValueError("A CID must be specified") cid = str(cid).strip() if len(cid) == 0: raise ValueError("A CID must be specified") return Serializer.capture_to_json(self.__project.get_capture(cid=cid))
def add_capture(self, name, date=None): if name is None: raise ValueError("A name must be specified") name = str(name).strip() if len(name) == 0: raise ValueError("A name must be specified") return Serializer.capture_to_json( self.__project.create_capture(name=name, date=date))
def get_captures(self, limit, offset): return [ Serializer.capture_to_json(capture) for capture in self.__project.get_captures(limit, offset) ]