def api_mixed_request(self, method_name, params):
    ' Make api request and download a file and return\n            JSON response or request status dictionary\n\n            :param method_name: name of API methods\n            :param params: dict-wrapped params for specific API call\n        '
    data = self.client.api_request(method_name, params, downloadable=True)
    class_name = to_snake(self.__class__.__name__.replace('Broker', ''))
    if (class_name in data):
        result_name = class_name
    else:
        result_name = method_name.split('/')[(- 1)]
        if (result_name not in data):
            return data
    return self._get_return_object_type(data.get(result_name))
Make api request and download a file and return
JSON response or request status dictionary

:param method_name: name of API methods
:param params: dict-wrapped params for specific API call
def api_mixed_request(self, method_name, params):
    ' Make api request and download a file and return\n            JSON response or request status dictionary\n\n            :param method_name: name of API methods\n            :param params: dict-wrapped params for specific API call\n        '
    data = self.client.api_request(method_name, params, downloadable=True)
    class_name = to_snake(self.__class__.__name__.replace('Broker', ))
    if (class_name in data):
        result_name = class_name
    else:
        result_name = method_name.split('/')[(- 1)]
        if (result_name not in data):
            return data
    return self._get_return_object_type(data.get(result_name))