You are here

public function EntityShareClient::get in Entity Share 7

Get an entity.

Parameters

string $entity_type: Node, etc.

int $entity_id: (optional) Entity uuid to get.

Return value

object|array Object of the response.

File

includes/entity_share.client.inc, line 185
Class for handling communication with Entity Share Server.

Class

EntityShareClient
Entity Share Client class.

Code

public function get($entity_type, $entity_id = NULL) {

  // Append path to endpoint URL.
  $url = $this->endpointUrl . '/' . $entity_type;
  if (!empty($entity_id)) {
    $url .= '/' . $entity_id;
  }
  return $this
    ->call($url, 'GET');
}