def credentials(self, app_id, app_key): if not all([app_id, app_key]): raise TflError("Missing App ID or App Key Credentials") self.app_id = app_id self.app_key = app_key
def _CheckResponse(self, content): if isinstance(content, (dict, list)) and 'exceptionType' in content: message = "{0}: {1}".format(content['httpStatusCode'], content['message']) raise TflError(message) return content