Build url that will hit the API.

@param int    $id                 The resource's id.
@param string $additionalEndpoint Additional endpoint that will be appended to the URL.

@return string
760991
public function url($id = null, $additionalEndpoint = null)
    {
        $endpoint = $this->endpoint();

        if (! is_null($id)) {
            $endpoint .= '/' . $id;
        }
        if (! is_null($additionalEndpoint)) {
            $endpoint .= '/' . $additionalEndpoint;
        }

        return $endpoint;
    }
1312169
@Override
    protected URI getEndpointURL(MessageContext<SAMLObject> messageContext) throws MessageEncodingException {
        try {
            return SAMLBindingSupport.getEndpointURL(messageContext);
        } catch (BindingException e) {
            throw new MessageEncodingException("Could not obtain message endpoint URL", e);
        }
    }
923433
protected function buildRequestUrl($endpoint, $params = null)
    {
        if($this->user == null)
            throw new Exception("Please authenticate user first!");

        $requestPath = $this->requestPath . $endpoint . ".json". $this->getParams( $params );

        return $requestPath;
    }
1175024
public function requestEndpoint(AbstractEndpoint $endpoint)
    {
        $cloned = clone $endpoint;
        $cloned->setType($this->getName());

        return $this->getIndex()->requestEndpoint($cloned);
    }
1092833
public function showAction($id, $extra) {
        $entity = $this->container->get("layout.read_handler")->get($id);
        $delete_form = $this->container->get("layout.form_handler")->createDeleteForm($id);


//        $route_collection = $this->container->get('router')->getRouteCollection()->all();
//        echo '<pre>';
//        if(is_object($route_collection))
//            print_r(get_class_methods($route_collection));
//            print_r($route_collection);
//            
//            echo '</pre>';

        $layout = str_replace(":show.html.twig", ":display.html.twig", $this->container->get("request")->get('_layout'));

        $params = array(
            "entity" => $entity
            , "extra" => $extra
        );

        return new Response($this->container->get('templating')->render($layout, $params));
    }
103090
public function addEndpoint(Endpoint $endpoint): Route
	{
		$this->endpoints[get_class($endpoint)] = $endpoint;
		return $this;
	}
168519
public function getUpdateUrl($id, array $parameters = [])
    {
        array_unshift($parameters, $this->getAlias(), $id);

        return route('admin.model.update', $parameters);
    }
894468
protected function topicsEndpoint($id = null)
    {
        return $id === null ? $this->topicsEndpoint : $this->topicsEndpoint . '/' . $id;
    }
774889
private EndpointActivationServiceInfo createEndpointActivationServiceInfo(String id) {
        EndpointActivationServiceInfo easInfo = endpointActivationServices.get(id);
        if (easInfo == null) {
            easInfo = new EndpointActivationServiceInfo(id);
            endpointActivationServices.put(id, easInfo);
        }
        return easInfo;
    }
540663
private function categoryEndpoint($id = null)
    {
        return $id === null ? $this->categoryEndpoint : $this->categoryEndpoint . '/' . $id;
    }
1084714
public static function url($id, $module_id = '') {
        $absolute_urls = false;
        if($module_id == '') {
            $module = \jacmoe\mdpages\Module::getInstance();
            if(!is_null($module)) {
                $module_id = $module->id;
                $absolute_urls = $module->absolute_wikilinks;
            }
        }
        if($module_id != '') {
            return Url::to(array('/' . $module_id . '/page/view', 'id' => $id), $absolute_urls);
        }
    }
424204
public function endpointUrl($prefix = null, $includeId = true)
    {
        $url = self::API_URL;

        // push company id
        if ($includeId) {
            $url = $url .'/'. $this->getCompanyId();
        }

        // push prefix
        if ($prefix = trim($prefix, '/')) {
            $url = $url .'/'. $prefix;
        }

        return $url;
    }
330792
protected function locateProject($id)
    {
        $url = $this->accountsEndpoint . 'projects/' . rawurlencode($id);
        try {
            $result = $this->simpleGet($url);
        }
        catch (BadResponseException $e) {
            $response = $e->getResponse();
            // @todo Remove 400 from this array when the API is more liberal in validating project IDs.
            $ignoredErrorCodes = [400, 403, 404];
            if ($response && in_array($response->getStatusCode(), $ignoredErrorCodes)) {
                return false;
            }
            throw ApiResponseException::create($e->getRequest(), $e->getResponse(), $e->getPrevious());
        }

        return isset($result['endpoint']) ? $result['endpoint'] : false;
    }
611684
private function buildUrl($endpoint, $url_parameters = [], $special_url = null)
    {
        foreach ($url_parameters as $key => $value) {
            //@codeCoverageIgnoreStart
            $endpoint = str_replace('{'.$key.'}', $value, $endpoint);
            //@codeCoverageIgnoreEnd
        }

        if (is_null($special_url)) {
            $url = trim($this->api_base_url, "/ \t\n\r\0\x0B");
        } else {
            $url = $special_url;
        }
        $url = $url.'/'.trim($endpoint, "/ \t\n\r\0\x0B");

        return $url;
    }
1119357
@VisibleForTesting
    static String makeEndPointPath(ServiceEndPoint endPoint) {
        String servicePath = makeServicePath(endPoint.getServiceName());
        String id = endPoint.getId();
        return ZKPaths.makePath(servicePath, id);
    }
32423
def _build_url(self, endpoint):
        
        if not issubclass(type(self), ChatApiBase) and not self.subdomain:
            raise ZenpyException("subdomain is required when accessing the Zendesk API!")

        if self.subdomain:
            endpoint.netloc = '{}.{}'.format(self.subdomain, self.domain)
        else:
            endpoint.netloc = self.domain

        endpoint.prefix_path(self.api_prefix)
        return endpoint.build()
1285482
public function get($id, array $additionalFields = array())
    {
        return $this->getSingle(
            'region/get',
            'Region',
            array('id' => (int)$id, 'fields' => self::getArray($additionalFields))
        );
    }