Generate the endpoint based on the current options.

@return string
962864
protected function getEndpoint()
    {
        $locale = $this->getLocale();
        $account = $this->getAccountId();
        $method = $this->getPaymentMethod();
        return '/' . $locale . '/api/' . $account . '/transactions/' . $method . '/new';
    }
263740
private function getEndPoint()
    {
        $url = $this->adapter->getResponse()->getUrl();
        $key = $this->adapter->getConfig('facebook[key]');

        if (empty($key)) {
            return;
        }

        if ($url->getDirectoryPosition(0) === 'events') {
            return  Url::create('https://graph.facebook.com/')
                        ->withAddedPath($url->getDirectoryPosition(1))
                        ->withQueryParameter('access_token', $key)
                        ->withQueryParameter('fields', $this->adapter->getConfig('facebook[events_fields]'));
        }

        if ($url->getDirectoryPosition(1) === 'videos') {
            return  Url::create('https://graph.facebook.com/')
                        ->withAddedPath($url->getDirectoryPosition(2))
                        ->withQueryParameter('access_token', $key)
                        ->withQueryParameter('fields', $this->adapter->getConfig('facebook[videos_fields]'));
        }
    }
1161652
protected function getEndpoint($method)
    {
        $endpoint = 'me/password';
        $reset = $this->getArgument('reset');
        $nonce = $this->getArgument('nonce');
        if (!is_null($reset)) {
            $endpoint .= '/reset';
            $this->delArgument('reset');
        }
        if (!is_null($nonce)) {
            $endpoint .= "/$nonce";
            $this->delArgument('nonce');
        }
        return $endpoint;
    }
706614
private function generateOptions(): string
    {
        /** @var string[] $inputs */
        $inputs = [
            (string) (new VerbosityString($this->output)),
        ];

        $userDefinition = $this->console->getUserDefinition();
        // Get user arguments
        foreach ($userDefinition->getArguments() as $argument) {
            $inputs[] = Argument::toString($this->input, $argument);
        }

        // Get user options
        foreach ($userDefinition->getOptions() as $option) {
            $inputs[] = Option::toString($this->input, $option);
        }

        return implode(' ', array_filter($inputs, static function (string $item): bool {
            return $item !== '';
        }));
    }
965933
protected function get_endpoint_path() {

		return empty( $this->request_path ) ? $this->endpoint : $this->endpoint . '/' . implode( '/', (array) $this->request_path );
	}
1155848
protected function getEndpoint()
    {
        // If force production is in effect
        if ($this->force_production) {
            $this->force_production = false;
            return $this->endpoints['production'];
        }

        // Return the active endpoint
        return $this->endpoints[$this->active_endpoint];
    }
665245
public function nextEndpoint() 
    {
        assert(is_array($this->_values[self::OPTION_ENDPOINT]));
        $endpoints = $this->_values[self::OPTION_ENDPOINT];

        $numberOfEndpoints = count($endpoints);

        $this->_currentEndpointIndex++;
        if ($this->_currentEndpointIndex >= $numberOfEndpoints) {
            $this->_currentEndpointIndex = 0;
        }

        $endpoint =  $endpoints[$this->_currentEndpointIndex];

        if ($numberOfEndpoints > 1) {
            $this->storeOptionsInCache();
        }

        return $endpoint;
    }
736470
private function getURL($endpoint = null)
    {
        if (is_null($endpoint)) {
            $endpoint = $this->getEndpoint();
        } else {
            $endpoint = '/api/' . $endpoint;
        }

        return $this->config['url'] . $endpoint;
    }
956849
private function getOrCreateEndpoint($endpoint)
    {
        if (!array_key_exists($endpoint, $this->endpoints)) {
            if (!array_key_exists($endpoint, self::$endpointClassMap)) {
                throw new \Exception(sprintf('Unknown endpoint "%s"', $endpoint));
            }

            $endpointClass = self::$endpointClassMap[$endpoint];
            $this->endpoints[$endpoint] = $this->createEndpoint($endpointClass);
        }

        return $this->endpoints[$endpoint];
    }
744971
protected function getEndpoint($method)
    {
        $endpoint = 'inspect';
        $number = $this->getArgument("number");
        if (!is_null($number)) {
            $endpoint .= "/$number";
            $this->delArgument("number");
        }
        return $endpoint;
    }
382325
private static function makeEndpoints($endpoints)
    {
        if (is_string($endpoints)) {
            return self::makeEndpointsFromString($endpoints, self::ROUTE_METHODS);
        }

        return $endpoints;
    }
525722
public function getActiveEndpoint()
    {
        // try to get endpoint with status active
        $active = $this->getEndpoints()->filter(function (Endpoint $endpoint) {
            return $endpoint->isActive();
        });

        // when empty, try other endpoints
        if ($active->isEmpty() === true) {
            $active = $this->getEndpoints()->filter(function (Endpoint $endpoint) {
                return $this->canBeActivated($endpoint);
            });
        }

        if ($active->isEmpty() === true) {
            throw new NoServerAvailableException('No active server available');
        }

        /** @var Endpoint $endpoint */
        $endpoint = $active->first();
        $endpoint->setStatus(Endpoint::STATUS_ACTIVE);

        return $endpoint;
    }
1106525
private function getBasicCurlOptions() {
        $curlOptions = $this->getOption(self::CURL_OPTIONS_KEY, array());
        $curlOptions[CURLOPT_HEADER] = true;
        $curlOptions[CURLOPT_RETURNTRANSFER] = true;
        $curlOptions[CURLOPT_USERAGENT] = $this->getOption(self::USER_AGENT_KEY);
        $curlOptions[CURLOPT_URL] = $this->getOption(self::BASE_URL_KEY);
        return $curlOptions;
    }
953215
public function getCropEndpoint(
        $endpoint,
        $parameters = array(),
        $absolute = UrlGeneratorInterface::ABSOLUTE_PATH
    ) {
        $parameters = array_merge($parameters, array('endpoint' => $endpoint));

        return $this->router->generate($this->routeName, $parameters, $absolute);
    }
704561
private function getEndpoint($type)
    {
        if (!array_key_exists($type, $this->endpoints)) {
            $this->endpoints[$type] = SearchEndpointFactory::get($type);
        }

        return $this->endpoints[$type];
    }
991610
public function registerEndpoint()
    {
        $this->app->bind('endpoint', function ($app) {
            return new Endpoint($app['hook.factory']);
        });

        $this->app->alias('endpoint', Endpoint::class);
    }
1147629
public function getRouteDefinitions()
    {
        $output = '';

        foreach ($this->getEndpointsInClasses($this->getReader()) as $endpoint) {
            $output .= $endpoint->toRouteDefinition().PHP_EOL.PHP_EOL;
        }

        return trim($output);
    }