public function Salesforce::getApiEndPoint in Salesforce Suite 7.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.
1 call to Salesforce::getApiEndPoint()
- Salesforce::apiHttpRequest in includes/
salesforce.inc - Private helper to issue an SF API request.
File
- includes/
salesforce.inc, line 252 - Objects, properties, and methods to communicate with the Salesforce REST API
Class
- Salesforce
- Ability to authorize and communicate with the Salesforce REST API.
Code
public function getApiEndPoint($api_type = 'rest') {
$url =& drupal_static(__FUNCTION__ . $api_type);
if (!isset($url)) {
// Special handling for apexrest, since it's not in the identity object.
if ($api_type == 'apexrest') {
$url = $this
->getInstanceUrl() . '/services/apexrest/';
}
else {
$identity = $this
->getIdentity();
$url = str_replace('{version}', $this->rest_api_version['version'], $identity['urls'][$api_type]);
}
}
return $url;
}