class_docstr: Class to retrieve IOCs from ThreatStream.com and store them in DynamoDB
docstr: Send API call to ThreatStream with next token and return parsed IOCs
  
  The API call has retry logic up to 3 times.
  Args:
      next_url (str): url of next token to retrieve more objects from
          ThreatStream
docstr_tok: ["Send","API","call","to","ThreatStream","with","next","token","and","return","parsed","IOCs","The","API","call","has","retry","logic","up","to","3","times",".","Args",":","next_url","(","str",")",":","url","of","next","token","to","retrieve","more","objects","from","ThreatStream"]
code: def _connect(self, next_url):
      """Send API call to ThreatStream with next token and return parsed IOCs
  
      The API call has retry logic up to 3 times.
      Args:
          next_url (str): url of next token to retrieve more objects from
              ThreatStream
      """
      intelligence = list()
      https_req = requests.get(
          "{}{}".format(self._API_URL, next_url), timeout=10
      )
  
      next_url = None
      if https_req.status_code == 200:
          data = https_req.json()
          if data.get("objects"):
              intelligence.extend(self._process_data(data["objects"]))
  
          LOGGER.info("IOC Offset: %d", data["meta"]["offset"])
          if not (
              data["meta"]["next"]
              and data["meta"]["offset"] < self.threshold
          ):
              LOGGER.debug(
                  "Either next token is empty or IOC offset reaches threshold "
                  "%d. Stop retrieve more IOCs.",
                  self.threshold,
              )
          else:
              next_url = data["meta"]["next"]
      elif https_req.status_code == 401:
          raise ThreatStreamRequestsError(
              "Response status code 401, unauthorized."
          )
      elif https_req.status_code == 500:
          raise ThreatStreamRequestsError(
              "Response status code 500, retry now."
          )
      else:
          raise ThreatStreamRequestsError(
              "Unknown status code {}, do not retry.".format(
                  https_req.status_code
              )
          )
  
      self._finalize(intelligence, next_url)
  
imports: from datetime import datetime, timedelta
  import json
  import backoff
  import boto3
  from botocore.exceptions import ClientError
  import requests
  from streamalert.shared.backoff_handlers import backoff_handler, success_handler, giveup_handler
  from streamalert.shared.config import load_config, parse_lambda_arn
  from streamalert.shared.logger import get_logger
  from streamalert.threat_intel_downloader.exceptions import ThreatStreamCredsError, ThreatStreamLambdaInvokeError, ThreatStreamRequestsError
label_desc: Use image node_id 4 for calling the ThreatStream obj's underlying member method code with example usage: obj._connect(next_url) without return types