You are here

public function SalesforceAuthProviderPluginBase::getApiEndpoint in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 src/SalesforceAuthProviderPluginBase.php \Drupal\salesforce\SalesforceAuthProviderPluginBase::getApiEndpoint()
  2. 5.0.x src/SalesforceAuthProviderPluginBase.php \Drupal\salesforce\SalesforceAuthProviderPluginBase::getApiEndpoint()

API Url for this plugin.

Parameters

string $api_type: (optional) Which API for which to retrieve URL, defaults to "rest".

Return value

string The URL.

Overrides SalesforceAuthProviderInterface::getApiEndpoint

File

src/SalesforceAuthProviderPluginBase.php, line 289

Class

SalesforceAuthProviderPluginBase
Shared methods for auth providers.

Namespace

Drupal\salesforce

Code

public function getApiEndpoint($api_type = 'rest') {
  $identity = $this
    ->getIdentity();
  if (empty($identity)) {
    throw new IdentityNotFoundException();
  }
  return $identity
    ->getUrl($api_type, $this
    ->getApiVersion());
}