示例#1
0
    def Get(self) -> "Hunt":
        """Fetch hunt's data and return proper Hunt object."""

        args = hunt_pb2.ApiGetHuntArgs(hunt_id=self.hunt_id)
        data = self._context.SendRequest("GetHunt", args)
        if not isinstance(data, hunt_pb2.ApiHunt):
            raise TypeError(f"Unexpected response type: '{type(data)}'")

        return Hunt(data=data, context=self._context)
示例#2
0
    def Get(self):
        """Fetch hunt's data and return proper Hunt object."""

        args = hunt_pb2.ApiGetHuntArgs(hunt_id=self.hunt_id)
        data = self._context.SendRequest("GetHunt", args)
        return Hunt(data=data, context=self._context)