コード例 #1
0
    def text(self) -> str:
        """Gets content as str if the response data content is not serialized
        protocol buffer message.

        Raises:
            ValueError: the response data is the serialized protocol buffer message
        """
        return to_str(self.data)
コード例 #2
0
ファイル: _response.py プロジェクト: berndverst/python-sdk
    def json(self) -> Dict[str, object]:
        """Gets the content as json if the response data content is not a serialized
        protocol buffer message.

        Returns:
            str: [description]
        """
        return json.loads(to_str(self.data))
コード例 #3
0
ファイル: _request.py プロジェクト: maneeshs/python-sdk
 def text(self) -> str:
     """Gets the request data as str."""
     return to_str(self.data)
コード例 #4
0
 def text(self) -> str:
     """Gets content as str."""
     return to_str(self._data)
コード例 #5
0
ファイル: _response.py プロジェクト: berndverst/python-sdk
 def json(self) -> Dict[str, object]:
     """Gets content as deserialized JSON dictionary."""
     return json.loads(to_str(self._value))
コード例 #6
0
ファイル: _response.py プロジェクト: berndverst/python-sdk
 def text(self) -> str:
     """Gets value as str."""
     return to_str(self._value)