You are here

public function Client::getDefinition in Acquia Connector 8.2

Same name and namespace in other branches
  1. 8 src/Client.php \Drupal\acquia_connector\Client::getDefinition()
  2. 3.x src/Client.php \Drupal\acquia_connector\Client::getDefinition()

Get SPI definition.

Parameters

string $apiEndpoint: API endpoint.

Return value

array|bool Definition array or FALSE.

File

src/Client.php, line 268

Class

Client
Acquia connector client.

Namespace

Drupal\acquia_connector

Code

public function getDefinition($apiEndpoint) {
  try {
    return $this
      ->request('GET', $apiEndpoint, []);
  } catch (ConnectorException $e) {
    $this
      ->getLogger('acquia connector')
      ->error($e
      ->getCustomMessage());
  }
  return FALSE;
}