def call_api(<EOL>self,<EOL>method,<EOL>url,<EOL>headers=None,<EOL>params=None,<EOL>data=None,<EOL>files=None,<EOL>timeout=None,<EOL>):
method = method.upper()<EOL>headers = deepcopy(headers) or {}<EOL>headers['<STR_LIT>'] = self.accept_type<EOL>params = deepcopy(params) or {}<EOL>data = data or {}<EOL>files = files or {}<EOL>if self.username and self.api_key:<EOL><INDENT>params.update(self.get_credentials())<EOL><DEDENT>url = urljoin(self.base_url, url)<EOL>r = requests.request(<EOL>method,<EOL>url,<EOL>headers=headers,<EOL>params=params,<EOL>files=files,<EOL>data=data,<EOL>timeout=timeout,<EOL>)<EOL>return r, r.status_code<EOL>
Call API.

        This returns object containing data, with error details if applicable.

        Args:
            method (str): The HTTP method to use.
            url (str): Resource location relative to the base URL.
            headers (dict or None): Extra request headers to set.
            params (dict or None): Query-string parameters.
            data (dict or None): Request body contents for POST or PUT requests.
            files (dict or None: Files to be passed to the request.
            timeout (int): Maximum time before timing out.

        Returns:
            ResultParser or ErrorParser.