class_docstr: A class for handling connections and interactions with the Webz API.
class_docstr_tok: ["A","class","for","handling","connections","and","interactions","with","the","Webz","API","."]
docstr: Calls the API method with the given params.
  
  Returns results as a pandas DataFrame.
  
  Args:
      method_name (str): Method name to call
      params (Dict): Params to pass to the API call
docstr_tok: ["Calls","the","API","method","with","the","given","params",".","Returns","results","as","a","pandas","DataFrame",".","Args",":","method_name","(","str",")",":","Method","name","to","call","params","(","Dict",")",":","Params","to","pass","to","the","API","call"]
code: def call_webz_api(
      self, method_name: str = None, params: Dict = None
  ) -> pd.DataFrame:
      """Calls the API method with the given params.
  
      Returns results as a pandas DataFrame.
  
      Args:
          method_name (str): Method name to call
          params (Dict): Params to pass to the API call
      """
      table_name = method_name
      table = self._tables[table_name]
  
      client = self.connect()
  
      left = None
      count_results = None
  
      data = []
      limit_exec_time = (
          time.time() + type(self).API_CALL_EXEC_LIMIT_SECONDS
      )
  
      if "size" in params:
          count_results = params["size"]
  
      #  GET param q is mandatory, so in order to collect all data,
      # it's needed to use as a query an asterisk (*)
      if "q" not in params:
          params["q"] = "*"
  
      while True:
          if time.time() > limit_exec_time:
              raise RuntimeError("Handler request timeout error")
  
          if count_results is not None:
              left = count_results - len(data)
              if left == 0:
                  break
              elif left < 0:
                  # got more results that we need
                  data = data[:left]
                  break
  
              if left > self.max_page_size:
                  params["size"] = self.max_page_size
              else:
                  params["size"] = left
  
          logger.debug(
              f"Calling Webz API: {table.ENDPOINT} with params ({params})"
          )
  
          output = (
              client.query(table.ENDPOINT, params)
              if len(data) == 0
              else client.get_next()
          )
          for item in output.get(table_name, []):
              data.append(self._parse_item(item, table.OUTPUT_COLUMNS))
  
      df = pd.DataFrame(data)
      return df
  
imports: import os
  import time
  from typing import Any, Dict
  import pandas
  import webzio
  from dotty_dict import dotty
  from mindsdb_sql import parse_sql
  from mindsdb.integrations.handlers.webz_handler.webz_tables import WebzPostsTable, WebzReviewsTable
  from mindsdb.integrations.libs.api_handler import APIHandler
  from mindsdb.integrations.libs.response import HandlerResponse
  from mindsdb.integrations.libs.response import HandlerStatusResponse
  from mindsdb.utilities import log
  from mindsdb.utilities.config import Config
label_desc: Use image node_id 7 for calling the WebzHandler obj's underlying member method code with example usage: obj.call_webz_api(method_name, params) and returns: df