code: def _method_call(self, method, category, **kwargs):
          
          session = requests.Session()
          try:
              response = session.get("http://" + self._api_address)
          except requests.exceptions.ConnectionError:
              raise FantasyDataError('Error: Cannot connect to the FantasyData API')
  
          method = method.format(format=self._response_format, **kwargs)
          request_url = "/v3/{game_type}/{category}/{format}/{method}?{get_params}".format(
              game_type=self.game_type,
              category=category,
              format=self._response_format,
              method=method,
              get_params=self._get_params)
          response = session.get(self._api_schema + self._api_address + request_url,
                                 headers=self._headers)
          result = response.json()
  
          if isinstance(result, dict) and response.status_code:
              if response.status_code == 401:
                  raise FantasyDataError('Error: Invalid API key')
              elif response.status_code == 200:
                  # for NBA everything is ok here.
                  pass
              else:
                  raise FantasyDataError('Error: Failed to get response')
  
          return result
docs: Call API method. Generate request. Parse response. Process errors
          `method` str API method url for request. Contains parameters
          `params` dict parameters for method url