. // // @ignore // =================================================================================================== /** * @package Kaltura * @subpackage Client */ class Kaltura_Client_ShortLink_ShortLinkService extends Kaltura_Client_ServiceBase { function __construct(Kaltura_Client_Client $client = null) { parent::__construct($client); } function listAction(Kaltura_Client_ShortLink_Type_ShortLinkFilter $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("shortlink_shortlink", "list", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_ShortLink_Type_ShortLinkListResponse"); return $resultObject; } function add(Kaltura_Client_ShortLink_Type_ShortLink $shortLink) { $kparams = array(); $this->client->addParam($kparams, "shortLink", $shortLink->toParams()); $this->client->queueServiceActionCall("shortlink_shortlink", "add", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_ShortLink_Type_ShortLink"); return $resultObject; } function get($id) { $kparams = array(); $this->client->addParam($kparams, "id", $id); $this->client->queueServiceActionCall("shortlink_shortlink", "get", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_ShortLink_Type_ShortLink"); return $resultObject; } function update($id, Kaltura_Client_ShortLink_Type_ShortLink $shortLink) { $kparams = array(); $this->client->addParam($kparams, "id", $id); $this->client->addParam($kparams, "shortLink", $shortLink->toParams()); $this->client->queueServiceActionCall("shortlink_shortlink", "update", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_ShortLink_Type_ShortLink"); return $resultObject; } function delete($id) { $kparams = array(); $this->client->addParam($kparams, "id", $id); $this->client->queueServiceActionCall("shortlink_shortlink", "delete", $kparams); if ($this->client->isMultiRequest()) return $this->client->getMultiRequestResult(); $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "Kaltura_Client_ShortLink_Type_ShortLink"); return $resultObject; } function gotoAction($id, $proxy = false) { $kparams = array(); $this->client->addParam($kparams, "id", $id); $this->client->addParam($kparams, "proxy", $proxy); $this->client->queueServiceActionCall('shortlink_shortlink', 'goto', $kparams); $resultObject = $this->client->getServeUrl(); return $resultObject; } }