. // // @ignore // =================================================================================================== /** * @package Kaltura * @subpackage Client */ class Kaltura_Client_Annotation_AnnotationService extends Kaltura_Client_ServiceBase { function __construct(Kaltura_Client_Client $client = null) { parent::__construct($client); } function add(Kaltura_Client_CuePoint_Type_CuePoint $annotation) { $kparams = array(); $this->client->addParam($kparams, "annotation", $annotation->toParams()); $this->client->queueServiceActionCall("annotation_annotation", "add", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Annotation_Type_Annotation"); return $resultObject; } function update($id, Kaltura_Client_CuePoint_Type_CuePoint $annotation) { $kparams = array(); $this->client->addParam($kparams, "id", $id); $this->client->addParam($kparams, "annotation", $annotation->toParams()); $this->client->queueServiceActionCall("annotation_annotation", "update", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Annotation_Type_Annotation"); return $resultObject; } function listAction(Kaltura_Client_CuePoint_Type_CuePointFilter $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("annotation_annotation", "list", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_Annotation_Type_AnnotationListResponse"); return $resultObject; } function addFromBulk($fileData) { $kparams = array(); $kfiles = array(); $this->client->addParam($kfiles, "fileData", $fileData); $this->client->queueServiceActionCall("annotation_annotation", "addFromBulk", $kparams, $kfiles); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_CuePoint_Type_CuePointListResponse"); return $resultObject; } function serveBulk(Kaltura_Client_CuePoint_Type_CuePointFilter $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('annotation_annotation', 'serveBulk', $kparams); $resultObject = $this->client->getServeUrl(); return $resultObject; } function get($id) { $kparams = array(); $this->client->addParam($kparams, "id", $id); $this->client->queueServiceActionCall("annotation_annotation", "get", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_CuePoint_Type_CuePoint"); return $resultObject; } function count(Kaltura_Client_CuePoint_Type_CuePointFilter $filter = null) { $kparams = array(); if ($filter !== null) $this->client->addParam($kparams, "filter", $filter->toParams()); $this->client->queueServiceActionCall("annotation_annotation", "count", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "integer"); return $resultObject; } function delete($id) { $kparams = array(); $this->client->addParam($kparams, "id", $id); $this->client->queueServiceActionCall("annotation_annotation", "delete", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); return $resultObject; } }