Invoke the old restserver.php endpoint.

@param Array $params method call object
@return the decoded response object
@throws FacebookApiException
489483
protected function _restserver($params) {
    // generic application level parameters
    $params['api_key'] = $this->getAppId();
    $params['format'] = 'json-strings';

    $result = json_decode($this->_oauthRequest(
      $this->getApiUrl($params['method']),
      $params
    ), true);

    // results are returned, errors are thrown
    if (is_array($result) && isset($result['error_code'])) {
      throw new FacebookApiException($result);
    }
    return $result;
  }
738718
public function execute(array $params = []) : Result
    {
        $params = array_replace($this->parameters, $params);

        if (
            empty($this->fields)
            && empty($this->avgAggregate)
            && empty($this->countAggregate)
            && empty($this->minAggregate)
            && empty($this->maxAggregate)
            && empty($this->sumAggregate)
        ) {
            $this->fields = ['*'];
        }

        return $this->connection->select($this, $params);
    }
1059858
private function api($method, $params) 
	{
    
		$basic = array(
		  'method'      => $method,
		  'appid'       => $this->appid,
		  'key'         => $this->key,
		  'path'        => $this->path,
		  'user_ip'     => $_SERVER['REMOTE_ADDR'],
		  'language'    => $this->language,
		  'platform'    => 'php'
		);

		return $this->call(array_merge(isset($params[0]) ? $params[0] : $params, $basic));
	}
375051
public function api($method, $path, $parameters = null, $version = null, $etag = null)
        {
            $session = new FacebookSession($this->getAccessToken());

            $request = with(new FacebookRequest($session, $method, $path, $parameters, $version, $etag))
                ->execute()
                ->getGraphObject(GraphUser::className());

            return $request;
        }
844969
public function call($method, array $params = array(), $format = 'php')
    {
        $params['method']       = $method;
        $params['token_auth']   = $this->token;
        $params['format']       = $format;

        $data = $this->getConnection()->send($params);

        if ('php' === $format) {
            $object = unserialize($data);

            if (isset($object['result']) && 'error' === $object['result']) {
                throw new Exception($object['message']);
            }

            return $object;
        } else {
            return $data;
        }
    }
838347
public function get($params = null)
    {
        $curlHandle = $this->prepareGet($params);
        return $this->curlGetResponse($curlHandle);
    }
1030561
public function update(array $params = [])
    {
        if (is_null($this->getId())) {
            $this->createBasket();
        }

        $params = array_merge($params, $this->updateParams);

        $this->callResourceAction(function ($params) {
            return $this->client->basketResource($this->version)
                                ->update($this->getId(), $params);
        }, $params);

        $this->updateParams = [];
    }
909073
protected function handleAssetRequest(array $params)
    {
        $response = new Response();

        $assetsConf = $this->config->getSection('asset_resolv');
        $assetsDir  = $this->config->get('app.public_dir') . '/assets';

        if (! empty($assetsConf['current'])) {
            $file = $assetsDir . '/' . $assetsConf['current'] . '/' . $params['filename'];

            if (file_exists($file)) {
                $fileResource = new Http\File\File($file);
                $mtime = filemtime($fileResource->getPathname());

                $response->headers->set('Content-Type', $fileResource->getMimeType());
                $response->setContent(file_get_contents($fileResource->getPathname()));
                $response->setCache(array(
                    'public' => true,
                    'last_modified' => new \DateTime(gmdate("D, d M Y H:i:s", $mtime))
                ));

                $response->setExpires(new \DateTime(gmdate("D, j M Y H:i:s", time() + MONTH)));
                $response->isNotModified($this->request);

                return $response;
            }
        } elseif (! empty($assetsConf['fallback'])) {

        }
    }
260865
public function request(string $method, ...$params) : ResponseInterface
    {
        try {
            $response = $this->client
                ->post($this->path, $this->makeJson($method, $params));

            if ($response->hasError()) {
                // throw exception on error
                throw new BadRemoteCallException($response);
            }

            return $response;
        } catch (Throwable $exception) {
            throw exception()->handle($exception);
        }
    }
6363
protected function tokenRequest(string $route, array $params): Response
    {
        try {
            return $this->client->request('POST', $route, ['json' => $params]);
        } catch (ClientException $exception) {
            if (in_array($exception->getResponse()->getStatusCode(), [401, 403])) {
                throw new ClientException(
                    'Unauthorized SDK Request',
                    $exception->getRequest(),
                    $exception->getResponse(),
                    null,
                    $exception->getHandlerContext()
                );
            }
            throw $exception;
        }
    }
305947
public static function load($params = null)
    {
        if (!isset(self::$_instance)) {
            self::$_instance = new Auth($params);
        }

        return self::$_instance;
    }
1195495
public static function parse($params = [])
	{
		$obj = new Body();

		foreach( (array) $params['vars'] as $item )
		{
			$obj->setVar($item['name'], $item['value']);
		}

		foreach( (array) $params['requests'] as $item )
		{
			$obj->setRequest($item);
		}

		return $obj;
	}
729423
public function delete($params, $optParams = [])
    {
        if (is_string($params)) {
            $params = ['publicId' => $params];
        }

        return $this->sendRequest(['cloudId', 'publicId'], [
            'restAction' => 'delete',
            'uri' => '/c/<cloudId>/o/<publicId>',
            'params' => $params,
            'getParams' => $optParams,
        ], function ($response) {
            return $response->success;
        });
    }
327764
public function refresh(array $params = []): Response
    {
        $this->_params = $params;

        $endpoint = new \Elasticsearch\Endpoints\Cluster\Nodes\Info();
        $endpoint->setNodeID($this->getNode()->getId());

        if (!empty($params)) {
            $endpoint->setMetric($params);
        }

        $this->_response = $this->getNode()->getClient()->requestEndpoint($endpoint);
        $data = $this->getResponse()->getData();

        $this->_data = \reset($data['nodes']);
        $this->_id = \key($data['nodes']);
        $this->getNode()->setId($this->getId());

        return $this->_response;
    }
932504
public function call($path = '', $params = [])
    {
        $default_params = [
            'api_token' => $this->getGuzzleClient()->getConfig('api_token'),
            'aid' => $this->getGuzzleClient()->getConfig('aid'),
        ];

        $params = array_merge($default_params, $params);

        if ($this->getGuzzleClient()->getConfig('method') === 'post') {
            $response = $this->getGuzzleClient()->post('/api/v3' . $path, [
                'verify' => false,
                'form_params' => $params,
            ]);
        } else {
            $response = $this->getGuzzleClient()->get('/api/v3' . $path, [
                'verify' => false,
                'query' => $params,
            ]);
        }
        $data = json_decode($response->getBody()->getContents());

        switch ($data->code) {
            case 401:
            case 404:
                throw new HttpRequestException($data->message);
                break;
            case 400:
            case 805:
            case 5001:
            case 5003:
                throw new InvalidArgumentException($data->message);
                break;
        }

        return $data;
    }
693009
private function get($path, array $params = [])
    {
        $request = $this->createHttpGetRequest($this->buildUrl($path), $params);

        $response = $this->httpClient->sendRequest($request);

        return $this->parseResponse($response, $request);
    }
1174186
public function withServerParams(array $params)
    {
        $request = $this->copy();
        $request->serverParams = $params;
        
        $request->reset();
        
        return $request;
    }