/** * add KalturaMediaEntry from email ingestion * * * @return \Kaltura\Client\Type\MediaEntry */ function addMediaEntry(\Kaltura\Client\Type\MediaEntry $mediaEntry, $uploadTokenId, $emailProfId, $fromAddress, $emailMsgId) { $kparams = array(); $this->client->addParam($kparams, "mediaEntry", $mediaEntry->toParams()); $this->client->addParam($kparams, "uploadTokenId", $uploadTokenId); $this->client->addParam($kparams, "emailProfId", $emailProfId); $this->client->addParam($kparams, "fromAddress", $fromAddress); $this->client->addParam($kparams, "emailMsgId", $emailMsgId); $this->client->queueServiceActionCall("emailingestionprofile", "addMediaEntry", "KalturaMediaEntry", $kparams); if ($this->client->isMultiRequest()) { return $this->client->getMultiRequestResult(); } $resultXml = $this->client->doQueue(); $resultXmlObject = new \SimpleXMLElement($resultXml); \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result); $resultObject = \Kaltura\Client\ParseUtils::unmarshalObject($resultXmlObject->result, "KalturaMediaEntry"); $this->client->validateObjectType($resultObject, "\\Kaltura\\Client\\Type\\MediaEntry"); return $resultObject; }
/** * Update media entry. Only the properties that were set will be updated. * * * @return \Kaltura\Client\Type\MediaEntry */ function update($entryId, \Kaltura\Client\Type\MediaEntry $mediaEntry) { $kparams = array(); $this->client->addParam($kparams, "entryId", $entryId); $this->client->addParam($kparams, "mediaEntry", $mediaEntry->toParams()); $this->client->queueServiceActionCall("media", "update", "KalturaMediaEntry", $kparams); if ($this->client->isMultiRequest()) { return $this->client->getMultiRequestResult(); } $resultXml = $this->client->doQueue(); $resultXmlObject = new \SimpleXMLElement($resultXml); \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result); $resultObject = \Kaltura\Client\ParseUtils::unmarshalObject($resultXmlObject->result, "KalturaMediaEntry"); $this->client->validateObjectType($resultObject, "\\Kaltura\\Client\\Type\\MediaEntry"); return $resultObject; }