. // // @ignore // =================================================================================================== /** * @package Kaltura * @subpackage Client */ class Kaltura_Client_DataService extends Kaltura_Client_ServiceBase { function __construct(Kaltura_Client_Client $client = null) { parent::__construct($client); } function add(Kaltura_Client_Type_DataEntry $dataEntry) { $kparams = array(); $this->client->addParam($kparams, "dataEntry", $dataEntry->toParams()); $this->client->queueServiceActionCall("data", "add", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_DataEntry"); return $resultObject; } function get($entryId, $version = -1) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "version", $version); $this->client->queueServiceActionCall("data", "get", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_DataEntry"); return $resultObject; } function update($entryId, Kaltura_Client_Type_DataEntry $documentEntry) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "documentEntry", $documentEntry->toParams()); $this->client->queueServiceActionCall("data", "update", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_DataEntry"); return $resultObject; } function delete($entryId) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->queueServiceActionCall("data", "delete", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); return $resultObject; } function listAction(Kaltura_Client_Type_DataEntryFilter $filter = null, Kaltura_Client_Type_FilterPager $pager = null) { $kparams = array(); if ($filter !== null) $this->client->addParam($kparams, "filter", $filter->toParams()); if ($pager !== null) $this->client->addParam($kparams, "pager", $pager->toParams()); $this->client->queueServiceActionCall("data", "list", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Type_DataListResponse"); return $resultObject; } function serve($entryId, $version = -1, $forceProxy = false) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "version", $version); $this->client->addParam($kparams, "forceProxy", $forceProxy); $this->client->queueServiceActionCall('data', 'serve', $kparams); $resultObject = $this->client->getServeUrl(); return $resultObject; } }