You are here

private function DataApi::generateEndpoint in Acquia Lift Connector 8

Generates an endpoint for a particular section of the Acquia Lift Data API.

Parameters

string $path: The endpoint path, e.g. 'segments' or 'events/my-event'

Return value

string The endpoint to make calls to.

3 calls to DataApi::generateEndpoint()
DataApi::deleteEvent in src/Service/Api/DataApi.php
Deletes an event from Acquia Lift Data
DataApi::getSegments in src/Service/Api/DataApi.php
Fetches the available Segment IDs from Acquia Lift
DataApi::saveEvent in src/Service/Api/DataApi.php
Saves an event to Acquia Lift Data

File

src/Service/Api/DataApi.php, line 103
Contains \Drupal\acquia_lift\Service\Api\DataApi.

Class

DataApi

Namespace

Drupal\acquia_lift\Service\Api

Code

private function generateEndpoint($path) {
  $url_scheme = $this->context
    ->getScheme() == 'https' ? 'https://' : 'http://';
  return $url_scheme . $this->credentialSettings['api_url'] . '/dashboard/rest/' . $this->credentialSettings['account_name'] . '/' . $path;
}