Ejemplo n.º 1
0
 def query_meta(self, identifier: str) -> (int, Optional[Content]):
     # check ID
     identifier = self.identifier(identifier)
     if identifier is None:
         return 400, None  # Bad Request
     # get meta
     meta = self.meta(identifier)
     if meta is None:
         return 404, None  # Not Found
     # OK
     return 200, MetaCommand.new(identifier=identifier, meta=meta)
Ejemplo n.º 2
0
 def query_meta(self, identifier: ID) -> bool:
     cmd = MetaCommand.new(identifier=identifier)
     return self.send_command(cmd=cmd)