Calls the API and, if successfull, returns the object delivered by the API.

@param string $_action The requested action.
@param array  $_data Parameters for the API action.

@return false||object
198845
private function api_request( $_action = '', $_data = '' ) {
		$update_data = $this->get_version_data();
		if ( empty( $update_data ) ) {
			return false;
		}
		if ( $update_data && isset( $update_data->sections ) ) {
			$update_data->sections = maybe_unserialize( $update_data->sections );
		}

		return $update_data;
	}
920726
function is_ajax_action( $actions ) {
            // Verify it's an ajax call.
            if ( ! self::is_ajax() ) {
                return false;
            }

            // Verify the call is relevant for the plugin.
            if ( $this->_module_id != fs_request_get( 'module_id' ) ) {
                return false;
            }

            // Verify it's one of the specified actions.
            if ( is_string( $actions ) ) {
                $actions = explode( ',', $actions );
            }

            if ( is_array( $actions ) && 0 < count( $actions ) ) {
                $ajax_action = fs_request_get( 'action' );

                foreach ( $actions as $action ) {
                    if ( $ajax_action === $this->get_action_tag( $action ) ) {
                        return true;
                    }
                }
            }

            return false;
        }
1262628
function dispatch($action_name) {
        if (method_exists($this, '_init')) {
            $this->_init();
        }
        $action = self::getActionMethodName($action_name);
        if (method_exists($this, $action)) {
            return $this->$action();
        } else {
            throw new NoActionException;
        }
    }
341858
function get_account_url( $action = false, $params = array(), $add_action_nonce = true ) {
            if ( is_string( $action ) ) {
                $params['fs_action'] = $action;
            }

            self::require_pluggable_essentials();

            return ( $add_action_nonce && is_string( $action ) ) ?
                fs_nonce_url( $this->_get_admin_page_url( 'account', $params ), $action ) :
                $this->_get_admin_page_url( 'account', $params );
        }
884089
public JsonResponse apiGet(ApiAction action, Map<String, Object> data) throws IOException {
        return httpRequestJson(action, HttpRequestMethod.GET, data);
    }
768171
public function getActionHandler($action_id)
    {
        $handlers = $this->getActionHandlers();
        return empty($handlers[$action_id]) ? array() : $handlers[$action_id];
    }
353618
public function doAction($action)
    {
        $controller = $this->getOption('hooks-controller');
        $instance = $this->getControllerInstance($controller);

        if (is_object($instance) && method_exists($instance, $action)) {
            $response = call_user_func([$instance, $action]);
        }

        $this->setAction('');

        return isset($response);
    }
334684
public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
		if ( ( 'plugin_information' != $_action ) || ! isset( $_args->slug ) || ( $_args->slug != $this->product->get_slug() ) ) {
			return $_data;
		}
		$api_response = $this->api_request();
		if ( false !== $api_response ) {
			$_data = $api_response;
		}

		return $_data;
	}
266540
protected function request($action, array $data, $async = false)
    {
        $method = $async ? 'postAsync' : 'post';
        $payload = json_encode($data);

        $response = $this->httpClient->$method($action, [
            'json' => $data,
            'headers' => [
                'X-ICObench-Key' => $this->publicKey,
                'X-ICObench-Sig' => $this->sign($payload)
            ]
        ]);

        if($async){
            return $response->then(
                function (ResponseInterface $res) {
                    return $this->processResponse($res);
                }
            );
        }

        return $this->processResponse($response);
    }
325454
public function dispatchAction($action = false)
    {
        $action = Dispatcher::formatActionName($action);
        return $this->callAction($action);
    }
1196168
protected function _mapAction($action) {
		$actionMap = $this->getConfig('actionMap');
		if (isset($actionMap[$action]) && method_exists($this, $actionMap[$action]['method'])) {
			$pass = (array)$this->_getRequest()->param('pass');
			call_user_func_array([$this, $actionMap[$action]['method']], $pass);

			if ($this->_redirectResponse instanceof Response) {
				return $this->_redirectResponse;
			}

			if (is_string($actionMap[$action]['view'])) {
				try {
					return $this->getController()->render($this->getController()->request->param('action'));
				} catch (MissingTemplateException $e) {
					return $this->getController()->render($actionMap[$action]['view']);
				}
			}

				return $this->_getResponse();
			}

		return false;
	}
738516
protected function actionReferencesController($action)
    {
        if ($action instanceof Closure) {
            return false;
        }

        return is_string($action) || is_string(array_get($action, 'uses'));
    }
1248116
public Api getActionResult(String action, String params, TokenResult token,
      Object pFormData) throws Exception {
    return getActionResult(action, params, token, pFormData, format);
  }
1053818
public function callAction ($action = FALSE)
	{
		
		// Set the request type
		
		$this->setRequestType ();
		
		// Set arguments
		
		$this->setArguments ();
		
		// Set the return type
		
		$this->setReturnType ();
		
		// Call action
		
		$this->Action ($action);
		
	}
1307046
protected function findCallable(array $action)
    {
        return ArrayHelper::filter($action, function ($key, $value) {
            return is_callable($value) && is_numeric($key);
        });
    }
314189
public function getData($action, $key)
    {
        if (!is_string($action) || empty($action)) {
            throw new \InvalidArgumentException('The action name is invalid');
        }

        if (!is_string($key) || empty($key)) {
            throw new \InvalidArgumentException('The data key name is invalid');
        }

        return $this->data[$action][$key];
    }
1159707
public function data(string $action = '', bool $allow_dimensions = false)
    {
        $action = $action ?: $this->action;

        if (!$this->action) {
            return; // Not applicable.
        } elseif ($action !== $this->action) {
            return; // Not applicable.
        } elseif (!isset($_REQUEST[$this->data_var])) {
            return; // Not applicable.
        }
        $data = $_REQUEST[$this->data_var];

        if (is_object($data)) {
            $data = (array) $data;
        }
        $data = $this->c::removeKey($data, '___ignore');
        // Removes keys needed to make forms submit an empty array.

        if (!$allow_dimensions && is_array($data)) {
            $data = array_map('strval', $data);
        }
        $data = $this->c::unslash($data);
        $data = $this->c::mbTrim($data);

        return $data;
    }