def _parse_api_response(self, response, resource_name):
        data = json.loads(response.text, object_hook=json_load_object_hook)
        assert data['Status'] == 'OK', "Expected the API to say OK but received %s" % data['Status']
        try:
            return data[resource_name]
        except KeyError:
            return data
dataset/ETHPy150Open freakboy3742/pyxero/xero/basemanager.py/BaseManager._parse_api_response/original