Esempio n. 1
0
 /**
  * Action goes over all tags with instanceCount==0 and checks whether they need to be removed from the DB. Returns number of removed tags.
  *      
  * 
  * @return int
  */
 function deletePending()
 {
     $kparams = array();
     $this->client->queueServiceActionCall("tagsearch_tag", "deletePending", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (int) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
Esempio n. 2
0
 /**
  * 
  * @return string
  */
 function getFaspUrl($flavorAssetId)
 {
     $kparams = array();
     $this->client->addParam($kparams, "flavorAssetId", $flavorAssetId);
     $this->client->queueServiceActionCall("aspera_aspera", "getFaspUrl", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (string) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
Esempio n. 3
0
 /**
  * Will write to the event log a single line representing the event
  * 	 client version - will help interprete the line structure. different client versions might have slightly different data/data formats in the line
  * event_id - number is the row number in yuval's excel
  * datetime - same format as MySql's datetime - can change and should reflect the time zone
  * session id - can be some big random number or guid
  * partner id
  * entry id
  * unique viewer
  * widget id
  * ui_conf id
  * uid - the puser id as set by the ppartner
  * current point - in milliseconds
  * duration - milliseconds
  * user ip
  * process duration - in milliseconds
  * control id
  * seek
  * new point
  * referrer
  * 	
  * 	
  * 	 KalturaStatsEvent $event
  * 	 
  * 
  * @return bool
  */
 function collect(\Kaltura\Client\Type\StatsEvent $event)
 {
     $kparams = array();
     $this->client->addParam($kparams, "event", $event->toParams());
     $this->client->queueServiceActionCall("stats", "collect", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (bool) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
Esempio n. 4
0
 /**
  * 
  * @return string
  */
 function upload($fileData)
 {
     $kparams = array();
     $kfiles = array();
     $this->client->addParam($kfiles, "fileData", $fileData);
     $this->client->queueServiceActionCall("upload", "upload", null, $kparams, $kfiles);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (string) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
 /**
  * Creates new download job for multiple entry ids (comma separated), an email will be sent when the job is done
  * 	 This sevice support the following entries: 
  * 	 - MediaEntry
  * 	 - Video will be converted using the flavor params id
  * 	 - Audio will be downloaded as MP3
  * 	 - Image will be downloaded as Jpeg
  * 	 - MixEntry will be flattened using the flavor params id
  * 	 - Other entry types are not supported
  * 	 Returns the admin email that the email message will be sent to 
  * 	 
  * 
  * @return string
  */
 function xAddBulkDownload($entryIds, $flavorParamsId = "")
 {
     $kparams = array();
     $this->client->addParam($kparams, "entryIds", $entryIds);
     $this->client->addParam($kparams, "flavorParamsId", $flavorParamsId);
     $this->client->queueServiceActionCall("xinternal", "xAddBulkDownload", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (string) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
 /**
  * 
  * @return int
  */
 function requestDryRun($scheduledTaskProfileId, $maxResults = 500)
 {
     $kparams = array();
     $this->client->addParam($kparams, "scheduledTaskProfileId", $scheduledTaskProfileId);
     $this->client->addParam($kparams, "maxResults", $maxResults);
     $this->client->queueServiceActionCall("scheduledtask_scheduledtaskprofile", "requestDryRun", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (int) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
 /**
  * Scan flavor asset according to virus scan profile
  * 	 
  * 
  * @return int
  */
 function scan($flavorAssetId, $virusScanProfileId = null)
 {
     $kparams = array();
     $this->client->addParam($kparams, "flavorAssetId", $flavorAssetId);
     $this->client->addParam($kparams, "virusScanProfileId", $virusScanProfileId);
     $this->client->queueServiceActionCall("virusscan_virusscanprofile", "scan", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (int) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
 /**
  * Index CategoryUser by userid and category id
  * 	 
  * 
  * @return int
  */
 function index($userId, $categoryId, $shouldUpdate = true)
 {
     $kparams = array();
     $this->client->addParam($kparams, "userId", $userId);
     $this->client->addParam($kparams, "categoryId", $categoryId);
     $this->client->addParam($kparams, "shouldUpdate", $shouldUpdate);
     $this->client->queueServiceActionCall("categoryuser", "index", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (int) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
 /**
  * Get download URL for the asset
  * 	 
  * 
  * @return string
  */
 function getUrl($id, $storageId = null)
 {
     $kparams = array();
     $this->client->addParam($kparams, "id", $id);
     $this->client->addParam($kparams, "storageId", $storageId);
     $this->client->queueServiceActionCall("caption_captionasset", "getUrl", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (string) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
Esempio n. 10
0
 /**
  * 
  * @return string
  */
 function getVersion()
 {
     $kparams = array();
     $this->client->queueServiceActionCall("system", "getVersion", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (string) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
 /**
  * request conversion for all entries that doesnt have the required flavor param
  * 	 returns a comma-separated ids of conversion jobs
  * 	 
  * 
  * @return string
  */
 function requestConversion($feedId)
 {
     $kparams = array();
     $this->client->addParam($kparams, "feedId", $feedId);
     $this->client->queueServiceActionCall("syndicationfeed", "requestConversion", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (string) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
Esempio n. 12
0
 /**
  * Get an admin session using admin email and password (Used for login to the KMC application)
  * 	 
  * 
  * @return string
  */
 function login($email, $password, $partnerId = null)
 {
     $kparams = array();
     $this->client->addParam($kparams, "email", $email);
     $this->client->addParam($kparams, "password", $password);
     $this->client->addParam($kparams, "partnerId", $partnerId);
     $this->client->queueServiceActionCall("adminuser", "login", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (string) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
Esempio n. 13
0
 /**
  * count cue point objects by filter
  * 	 
  * 
  * @return int
  */
 function count(\Kaltura\Client\Plugin\CuePoint\Type\CuePointFilter $filter = null)
 {
     $kparams = array();
     if ($filter !== null) {
         $this->client->addParam($kparams, "filter", $filter->toParams());
     }
     $this->client->queueServiceActionCall("annotation_annotation", "count", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (int) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
Esempio n. 14
0
 /**
  * 
  * @return bool
  */
 function checkLikeExists($entryId, $userId = null)
 {
     $kparams = array();
     $this->client->addParam($kparams, "entryId", $entryId);
     $this->client->addParam($kparams, "userId", $userId);
     $this->client->queueServiceActionCall("like_like", "checkLikeExists", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (bool) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
Esempio n. 15
0
 /**
  * Action which checks whther user login 
  *      
  * 
  * @return bool
  */
 function checkLoginDataExists(\Kaltura\Client\Type\UserLoginDataFilter $filter)
 {
     $kparams = array();
     $this->client->addParam($kparams, "filter", $filter->toParams());
     $this->client->queueServiceActionCall("user", "checkLoginDataExists", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (bool) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
 /**
  * Dispatch event notification object by id
  * 	 
  * 
  * @return int
  */
 function dispatch($id, \Kaltura\Client\Plugin\EventNotification\Type\EventNotificationDispatchJobData $data)
 {
     $kparams = array();
     $this->client->addParam($kparams, "id", $id);
     $this->client->addParam($kparams, "data", $data->toParams());
     $this->client->queueServiceActionCall("eventnotification_eventnotificationtemplate", "dispatch", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (int) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
 /**
  * Will serve a requested report
  * 	 
  * 
  * @return string
  */
 function serveReport($id)
 {
     $kparams = array();
     $this->client->addParam($kparams, "id", $id);
     $this->client->queueServiceActionCall("livereports", "serveReport", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (string) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
Esempio n. 18
0
 /**
  * This will queue a batch job for converting the document file to swf
  * 	 Returns the URL where the new swf will be available 
  * 	 
  * 
  * @return string
  */
 function convertPptToSwf($entryId)
 {
     $kparams = array();
     $this->client->addParam($kparams, "entryId", $entryId);
     $this->client->queueServiceActionCall("document", "convertPptToSwf", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (string) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
Esempio n. 19
0
 /**
  * Start an impersonated session with Kaltura's server.
  * 	 The result KS is the session key that you should pass to all services that requires a ticket.
  * 	 
  * 
  * @return string
  */
 function impersonate($secret, $impersonatedPartnerId, $userId = "", $type = 0, $partnerId = null, $expiry = 86400, $privileges = null)
 {
     $kparams = array();
     $this->client->addParam($kparams, "secret", $secret);
     $this->client->addParam($kparams, "impersonatedPartnerId", $impersonatedPartnerId);
     $this->client->addParam($kparams, "userId", $userId);
     $this->client->addParam($kparams, "type", $type);
     $this->client->addParam($kparams, "partnerId", $partnerId);
     $this->client->addParam($kparams, "expiry", $expiry);
     $this->client->addParam($kparams, "privileges", $privileges);
     $this->client->queueServiceActionCall("session", "impersonate", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (string) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
Esempio n. 20
0
 /**
  * Delivering the status of a live stream (on-air/offline) if it is possible
  * 	 
  * 
  * @return bool
  */
 function isLive($id, $protocol)
 {
     $kparams = array();
     $this->client->addParam($kparams, "id", $id);
     $this->client->addParam($kparams, "protocol", $protocol);
     $this->client->queueServiceActionCall("livestream", "isLive", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (bool) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }
 /**
  * will create a Csv file for the given report and return the URL to access it
  * 	 
  * 
  * @return string
  */
 function getUrlForReportAsCsv($reportTitle, $reportText, $headers, $reportType, \Kaltura\Client\Type\ReportInputFilter $reportInputFilter, $dimension = null, \Kaltura\Client\Type\FilterPager $pager = null, $order = null, $objectIds = null)
 {
     $kparams = array();
     $this->client->addParam($kparams, "reportTitle", $reportTitle);
     $this->client->addParam($kparams, "reportText", $reportText);
     $this->client->addParam($kparams, "headers", $headers);
     $this->client->addParam($kparams, "reportType", $reportType);
     $this->client->addParam($kparams, "reportInputFilter", $reportInputFilter->toParams());
     $this->client->addParam($kparams, "dimension", $dimension);
     if ($pager !== null) {
         $this->client->addParam($kparams, "pager", $pager->toParams());
     }
     $this->client->addParam($kparams, "order", $order);
     $this->client->addParam($kparams, "objectIds", $objectIds);
     $this->client->queueServiceActionCall("report", "getUrlForReportAsCsv", null, $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = (string) \Kaltura\Client\ParseUtils::unmarshalSimpleType($resultXmlObject->result);
     return $resultObject;
 }