code: def __call_api(self, path, params=None, api_url=FORECAST_URL):
          
          if not params:
              params = dict()
          payload = {'key': self.api_key}
          payload.update(params)
          url = "%s/%s" % (api_url, path)
  
          # Add a timeout to the request.
          # The value of 1 second is based on attempting 100 connections to
          # datapoint and taking ten times the mean connection time (rounded up).
          # Could expose to users in the functions which need to call the api.
          #req = requests.get(url, params=payload, timeout=1)
          # The wrapper function __retry_session returns a requests.Session
          # object. This has a .get() function like requests.get(), so the use
          # doesn't change here.
  
          sess = self.__retry_session()
          req = sess.get(url, params=payload, timeout=1)
  
          try:
              data = req.json()
          except ValueError:
              raise APIException("DataPoint has not returned any data, this could be due to an incorrect API key")
          self.call_response = data
          if req.status_code != 200:
              msg = [data[m] for m in ("message", "error_message", "status") \
                        if m in data][0]
              raise Exception(msg)
          return data
docs: Call the datapoint api using the requests module