def _make_request(session, url, argument=None, params=None, raw=False):
if not params:<EOL><INDENT>params = {}<EOL><DEDENT>params['<STR_LIT:key>'] = session.auth.key<EOL>try:<EOL><INDENT>if argument:<EOL><INDENT>request_url = '<STR_LIT>'.format(session.auth.base_url, VOOBLY_API_URL, url, argument)<EOL><DEDENT>else:<EOL><INDENT>request_url = '<STR_LIT>'.format(VOOBLY_API_URL, url)<EOL><DEDENT>resp = session.get(request_url, params=params)<EOL><DEDENT>except RequestException:<EOL><INDENT>raise VooblyError('<STR_LIT>')<EOL><DEDENT>if resp.text == '<STR_LIT>':<EOL><INDENT>raise VooblyError('<STR_LIT>')<EOL><DEDENT>elif resp.text == '<STR_LIT>':<EOL><INDENT>raise VooblyError('<STR_LIT>')<EOL><DEDENT>elif not resp.text:<EOL><INDENT>raise VooblyError('<STR_LIT>')<EOL><DEDENT>if raw:<EOL><INDENT>return resp.text<EOL><DEDENT>try:<EOL><INDENT>return tablib.Dataset().load(resp.text).dict<EOL><DEDENT>except UnsupportedFormat:<EOL><INDENT>raise VooblyError('<STR_LIT>'.format(resp.text))<EOL><DEDENT>
Make a request to API endpoint.