public function RestClient::getApiEndPoint in Salesforce Suite 8.3
Get the API end point for a given type of the API.
Parameters
string $api_type: E.g., rest, partner, enterprise.
Return value
string Complete URL endpoint for API access.
Overrides RestClientInterface::getApiEndPoint
Deprecated
in 8.x-4.0, use \Drupal\salesforce\SalesforceAuthProviderInterface::getApiEndpoint instead.
2 calls to RestClient::getApiEndPoint()
- RestClient::apiCall in src/
Rest/ RestClient.php - Make a call to the Salesforce REST API.
- RestClient::queryMore in src/
Rest/ RestClient.php - Given a select query result, fetch the next results set, if it exists.
File
- src/
Rest/ RestClient.php, line 340
Class
- RestClient
- Objects, properties, and methods to communicate with the Salesforce REST API.
Namespace
Drupal\salesforce\RestCode
public function getApiEndPoint($api_type = 'rest') {
$url =& drupal_static(__FUNCTION__ . $api_type);
if (!isset($url)) {
$identity = $this
->getIdentity();
if (empty($identity)) {
return FALSE;
}
if (is_string($identity)) {
$url = $identity;
}
elseif (isset($identity['urls'][$api_type])) {
$url = $identity['urls'][$api_type];
}
$url = str_replace('{version}', $this
->getApiVersion(), $url);
}
return $url;
}