public function fromReportsInputFilter($endUserReportsInputFilter)
 {
     parent::fromReportsInputFilter($endUserReportsInputFilter);
     $this->application = $endUserReportsInputFilter->application;
     $this->userIds = $endUserReportsInputFilter->userIds;
     $this->playbackContext = $endUserReportsInputFilter->playbackContext;
     return $this;
 }
 function getUrlForReportAsCsv($reportTitle, $reportText, $headers, $reportType, KalturaReportInputFilter $reportInputFilter, $dimension = null, KalturaFilterPager $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", $kparams);
     if ($this->client->isMultiRequest()) {
         return null;
     }
     $resultObject = $this->client->doQueue();
     $this->client->throwExceptionIfError($resultObject);
     $this->client->validateObjectType($resultObject, "string");
     return $resultObject;
 }
 function getPartnerUsage(KalturaPartnerFilter $partnerFilter = null, KalturaReportInputFilter $usageFilter = null, KalturaFilterPager $pager = null)
 {
     $kparams = array();
     if ($partnerFilter !== null) {
         $this->client->addParam($kparams, "partnerFilter", $partnerFilter->toParams());
     }
     if ($usageFilter !== null) {
         $this->client->addParam($kparams, "usageFilter", $usageFilter->toParams());
     }
     if ($pager !== null) {
         $this->client->addParam($kparams, "pager", $pager->toParams());
     }
     $this->client->queueServiceActionCall("varconsole_varconsole", "getPartnerUsage", $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultObject = $this->client->doQueue();
     $this->client->throwExceptionIfError($resultObject);
     $this->client->validateObjectType($resultObject, "KalturaPartnerUsageListResponse");
     return $resultObject;
 }
 /**
  * 
  * will create a Csv file for the given report and return the URL to access it
  * @action getUrlForReportAsCsv
  * 
  * @param string $reportTitle The title of the report to display at top of CSV 
  * @param string $reportText The text of the filter of the report
  * @param string $headers The headers of the columns - a map between the enumerations on the server side and the their display text  
  * @param KalturaReportType $reportType  
  * @param KalturaReportInputFilter $reportInputFilter
  * @param string $dimension	  
  * @param KalturaFilterPager $pager
  * @param KalturaReportType $reportType 
  * @param string $order
  * @param string $objectIds - one ID or more (separated by ',') of specific objects to query
  * @return string 
  */
 public function getUrlForReportAsCsvAction($reportTitle, $reportText, $headers, $reportType, KalturaReportInputFilter $reportInputFilter, $dimension = null, KalturaFilterPager $pager = null, $order = null, $objectIds = null)
 {
     if ($reportType == KalturaReportType::PARTNER_USAGE || $reportType == KalturaReportType::VAR_USAGE) {
         $objectIds = $this->validateObjectsAreAllowedPartners($objectIds);
     }
     $report = myReportsMgr::getUrlForReportAsCsv($this->getPartnerId(), $reportTitle, $reportText, $headers, $reportType, $reportInputFilter->toReportsInputFilter(), $dimension, $objectIds, $pager->pageSize, $pager->pageIndex, $order);
     return $report;
 }
Example #5
0
 /**
  * 
  * will create a Csv file for the given report and return the URL to access it
  * @action getUrlForReportAsCsv
  * 
  * @param string $reportTitle The title of the report to display at top of CSV 
  * @param string $reportText The text of the filter of the report
  * @param string $headers The headers of the columns - a map between the enumerations on the server side and the their display text  
  * @param KalturaReportType $reportType  
  * @param KalturaReportInputFilter $reportInputFilter
  * @param string $dimension	  
  * @param KalturaFilterPager $pager
  * @param KalturaReportType $reportType 
  * @param string $order
  * @param string $objectIds - one ID or more (separated by ',') of specific objects to query
  * @return string 
  */
 public function getUrlForReportAsCsvAction($reportTitle, $reportText, $headers, $reportType, KalturaReportInputFilter $reportInputFilter, $dimension = null, KalturaFilterPager $pager = null, $order = null, $objectIds = null)
 {
     if ($reportType == KalturaReportType::PARTNER_USAGE || $reportType == KalturaReportType::VAR_USAGE) {
         $objectIds = $this->validateObjectsAreAllowedPartners($objectIds);
     }
     try {
         $report = myReportsMgr::getUrlForReportAsCsv($this->getPartnerId(), $reportTitle, $reportText, $headers, $reportType, $reportInputFilter->toReportsInputFilter(), $dimension, $objectIds, $pager->pageSize, $pager->pageIndex, $order);
     } catch (Exception $e) {
         $code = $e->getCode();
         if ($code == kCoreException::SEARCH_TOO_GENERAL) {
             throw new KalturaAPIException(KalturaErrors::SEARCH_TOO_GENERAL);
         }
     }
     if (infraRequestUtils::getProtocol() == infraRequestUtils::PROTOCOL_HTTPS) {
         $report = str_replace("http://", "https://", $report);
     }
     return $report;
 }
Example #6
0
 /**
  * 
  * will create a Csv file for the given report and return the URL to access it
  * @action getUrlForReportAsCsv
  * 
  * @param string $reportTitle The title of the report to display at top of CSV 
  * @param string $reportText The text of the filter of the report
  * @param string $headers The headers of the columns - a map between the enumerations on the server side and the their display text  
  * @param KalturaReportType $reportType  
  * @param KalturaReportInputFilter $reportInputFilter
  * @param string $dimension	  
  * @param KalturaFilterPager $pager
  * @param KalturaReportType $reportType 
  * @param string $order
  * @param string $objectIds - one ID or more (separated by ',') of specific objects to query
  * @return string 
  */
 function getUrlForReportAsCsvAction($reportTitle, $reportText, $headers, $reportType, KalturaReportInputFilter $reportInputFilter, $dimension = null, KalturaFilterPager $pager = null, $order = null, $objectIds = null)
 {
     return myReportsMgr::getUrlForReportAsCsv($this->getPartnerId(), $reportTitle, $reportText, $headers, $reportType, $reportInputFilter->toReportsInputFilter(), $dimension, $objectIds, $pager->pageSize, $pager->pageIndex, $order);
 }