class_docstr: OneLogin StreamAlert App
class_docstr_tok: ["OneLogin","StreamAlert","App"]
docstr: Get the number of seconds we need to sleep until we are clear to continue
docstr_tok: ["Get","the","number","of","seconds","we","need","to","sleep","until","we","are","clear","to","continue"]
code: def _set_rate_limit_sleep(self):
      """Get the number of seconds we need to sleep until we are clear to continue"""
      # Make sure we have authentication headers
      if not self._auth_headers:
          self._rate_limit_sleep = 0
          LOGGER.error("[%s] No authentication headers set", self)
          return
  
      result, response = self._make_get_request(
          self._rate_limit_endpoint(), self._auth_headers
      )
  
      if not result:
          self._rate_limit_sleep = 0
          return
  
      # Making sure we have a valid response
      if not response:
          LOGGER.error(
              "[%s] Response invalid, could not get rate limit info",
              self,
          )
          self._rate_limit_sleep = 0
          return
  
      self._rate_limit_sleep = response.get("data")["X-RateLimit-Reset"]
      LOGGER.info(
          "[%s] Rate limit sleep set: %d", self, self._rate_limit_sleep
      )
  
file_path: streamalert/streamalert/apps/_apps/onelogin.py
imports: import re
  from .None import AppIntegration, StreamAlertApp, get_logger
label_desc: Use image node_id 10 for calling the OneLoginApp obj's underlying member method code with example usage: obj._set_rate_limit_sleep() without return types