Sets call resource for target endpoint.

@param string $resource
@param string $endpoint

@return LeagueAPI
182152
protected function setResource( string $resource, string $endpoint ): self
	{
		$this->resource = $resource;
		$this->resource_endpoint = $endpoint;
		return $this;
	}
14155
public function buildUrl($endpoint)
    {
        if (filter_var($endpoint, FILTER_VALIDATE_URL))
        {
            return $endpoint . '.' . $this->dataFormat;
        }

        if (substr($this->url, -1) != '/')
        {
            $this->url = $this->url . '/';
        }

        return $this->url . $endpoint . '.' . $this->dataFormat;
    }
750338
public function requestEndpoint(AbstractEndpoint $endpoint)
    {
        $cloned = clone $endpoint;
        $cloned->setIndex($this->getName());

        return $this->getClient()->requestEndpoint($cloned);
    }
538907
public function request($method, $endpoint, array $parameters = null)
    {
        $url = $this->config->getEndpoint() . $endpoint;

        // Client should always send OAuth2 tokens in its headers
        $headers = array('Authorization' => 'Bearer ' . $this->config->getAccessToken());

        return $this->client->request($method, $url, $parameters, $headers);
    }
468085
protected function _transformResource(Endpoint $endpoint, array $result)
    {
        $properties = [];

        foreach ($result as $property => $value) {
            $properties[$property] = $value;
        }

        return $this->_createResource($endpoint->getResourceClass(), $properties);
    }
904507
function setEndPointGroup($endPointGroup) {
        if (strlen($this->getEndPoint()) > 0)
        {
            throw new RuntimeException(
                "End point has been already set. You can set either end point or end point group."
            );
        }

        $this->endPointGroup = (int) $endPointGroup;
    }
73902
protected function configureRefreshEndpoint(EndpointInterface $Endpoint)
    {
        $data = array();
        $data['client_id'] = $this->credentials['client_id'];
        $data['client_secret'] = $this->credentials['client_secret'];
        $data['grant_type'] = self::OAUTH_REFRESH_GRANT;
        $data['refresh_token'] = $this->token['refresh_token'];
        return $Endpoint->setData($data);
    }
189354
private function setApiEndPoint($endPoint)
    {
        if (empty($this->host))
            throw new OdooException('You must provide the odoo host by host setter method');

        return $this->host . $this->suffix . $endPoint;

    }
863832
public function callEndpoint($endpoint, array $endpointParameters = [], $body = null, $method = HttpMethod::REQUEST_GET)
    {
        // Set the endpoint
        $this->setEndpoint($endpoint);
        // Set the parameters
        $this->setEndpointParameters($endpointParameters);
        // Set the body
        $this->setBody($body);
        // Set the HTTP method
        $this->setHttpMethod($method);
        // Call the endpoint
        $this->call();
        // return the result
        return $this->getResult();
    }
416568
protected function getEndpointsWithResourceMethods(EndpointCollection $endpoints)
    {
        return Collection::make($endpoints)->filter(function ($endpoint) {
            return $endpoint instanceof MethodEndpoint &&
                    in_array($endpoint->method, $this->methods);
        })->all();
    }
207742
public function node($endpoint)
    {
        $request = new Request($endpoint, $this->secret, 'node', []);

        return $this->sendBatchRequest([$request]);
    }
704992
public synchronized void setEndpoint(URI endpoint) {
        checkUpdatable();
        int port = endpoint.getPort();
        if (port==80||port==443) {
            if (MwsUtl.usesStandardPort(endpoint)) {
                try {
                    //some versions of apache http client cause signature errors when
                    //standard port is explicitly used, so remove that case.
                    endpoint = new URI(endpoint.getScheme(), endpoint.getHost(), 
                            endpoint.getPath(), endpoint.getFragment());
                } catch (URISyntaxException e) {
                    throw new IllegalArgumentException(e);
                }
            }
        }
        this.endpoint = endpoint;
    }
653960
public function endpoint($point)
    {
        $endpoint = $this->container->make(Endpoint::class);

        $endpoint
            ->setPoint($point)
            ->add();

        return $this->hang($endpoint);
    }
1168037
protected function setEndpoint(string $endpoint)
    {
        $fullEndpoint = 'https://' . $endpoint . '/rpc';

        if (!empty($endpoint) && $fullEndpoint !== $this->endpoint) {
            $this->endpoint = $fullEndpoint;
        }
    }
1228720
public function setEndpoint($endpoint)
    {
        // Clean the credential information from the endpoint.
        $filterParams = ['affiliate_id', 'api_id'];
        $this->endpoint = DmmUrlManipulator::removeParamsFromUrl($endpoint, $filterParams);

        return $this;
    }
753543
public function endpoint(ApiEndpoint $endpoint)
    {
        $this->endpointsByName[$endpoint->getName()] = $endpoint;

        switch ($endpoint->getHttpMethod()) {

            case HttpMethods::GET:

                $this->get($endpoint->getPath(), $endpoint->getHandlerMethod(), $this->createRouteName($endpoint));
                break;

            case HttpMethods::POST:

                $this->post($endpoint->getPath(), $endpoint->getHandlerMethod(), $this->createRouteName($endpoint));
                break;

            case HttpMethods::PUT:

                $this->put($endpoint->getPath(), $endpoint->getHandlerMethod(), $this->createRouteName($endpoint));
                break;

            case HttpMethods::DELETE:

                $this->delete($endpoint->getPath(), $endpoint->getHandlerMethod(), $this->createRouteName($endpoint));
                break;
        }

        return $this;
    }
907306
private static function curl(string $endpoint)
    {
        // Get the base URL and App Key.
        $baseUrl = self::$_baseUrl;

        // Create a cURL session.
        $curl = curl_init();

        // Set the options necessary for communicating with the UCRM Server.
        curl_setopt($curl, CURLOPT_URL, $baseUrl.$endpoint);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($curl, CURLOPT_HEADER, false);

        // TODO: Determine if we EVER need to use HTTPS and how to handle it correctly here!
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); // DEFAULT
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 1); // DEFAULT

        // Set the necessary HTTP HEADERS.
        curl_setopt($curl, CURLOPT_HTTPHEADER, self::$_headers);

        return $curl;
    }