docs: def _request(self, request_method, endpoint='', url='', data=None, params=None, use_api_key=False, omit_api_version=False):
          """Perform a http request via the specified method to an API endpoint.
  
          :param string request_method: Request method.
          :param string endpoint: Target endpoint. (Optional).
          :param string url: Override the endpoint and provide the full url (eg for pagination). (Optional).
          :param dict params: Provide parameters to pass to the request. (Optional).
          :param dict data: Data to pass to the post. (Optional).
          :return: Response
          :rtype: ``Response``
          """
          if not data:
              data = {}
          if not params:
              params = {}
          if endpoint and omit_api_version and not url:
              url = '%s/%s' % (self.base_url, endpoint)
          if endpoint and not url:
              url = '%s/%s/%s' % (self.base_url, settings.API_VERSION, endpoint)
  
          if use_api_key:
              headers = {
                  'Authorization': self.auth.get_api_key(),
                  'User-Agent': self.user_agent,
              }
          else:
              headers = {
                  'Authorization': self.auth.get_authorization(),
                  'User-Agent': self.user_agent,
              }
  
          response = requests.__getattribute__(request_method)(
              url=url,
              hooks=settings.REQUEST_HOOK,
              headers=headers,
              json=data,
              params=params
          )
          if ((response.status_code != 200) and (response.status_code != 202)):
              try:
                  response.raise_for_status()
              except requests.exceptions.HTTPError as e:
                  raise PyCronofyRequestError(
                      request=e.request,
                      response=e.response,
                  )
          return response