This software is the intellectual property of MediaSift Ltd., and is covered by retained intellectual property rights, including copyright. Distribution of this software is strictly forbidden under the terms of this license. The DataSift_Historic class represents a historic query.
Author: Stuart Dallas (stuart@3ft9.com)
コード例 #1
0
ファイル: env.php プロジェクト: datasift/datasift-php
 /**
  * Displays details of a Historics query.
  *
  * @param DataSift_Historic $hist A DataSift Historics object
  */
 public function displayHistoricDetails($hist)
 {
     echo 'Playback ID: ' . $hist->getHash() . PHP_EOL;
     echo 'Stream hash: ' . $hist->getStreamHash() . PHP_EOL;
     echo 'Name:        ' . $hist->getName() . PHP_EOL;
     echo 'Start time:  ' . date('r', $hist->getStartDate()) . PHP_EOL;
     echo 'End time:    ' . date('r', $hist->getEndDate()) . PHP_EOL;
     $sources = $hist->getSources();
     echo 'Source' . (count($sources) == 1 ? ': ' : 's:') . '     ' . implode(', ', $sources) . PHP_EOL;
     echo 'Sample:      ' . $hist->getSample() . PHP_EOL;
     echo 'Created at:  ' . (is_null($hist->getCreatedAt()) ? 'null' : date('r', $hist->getCreatedAt())) . PHP_EOL;
     echo 'Status:      ' . $hist->getStatus() . PHP_EOL;
 }
コード例 #2
0
ファイル: Definition.php プロジェクト: datasift/datasift-php
 /**
  * Subscribe this endpoint to a Historic.
  * 
  * @param DataSift_Historic $historic The historic object to which to subscribe.
  * @param string            $name     A name for this subscription.
  *
  * @return DataSift_PushSubscription  The new subscription.
  * @throws DataSift_Exception_InvalidData
  * @throws DataSift_Exception_AccessDenied
  * @throws DataSift_Exception_APIError
  */
 public function subscribeHistoric($historic, $name)
 {
     return $this->subscribeHistoricPlaybackId($historic->getHash(), $name);
 }
コード例 #3
0
ファイル: User.php プロジェクト: datasift/datasift-php
 /**
  * Get a list of Historics queries in your account.
  *
  * @param int $page The page number to get.
  * @param int $per_page The number of items per page.
  *
  * @return array Of DataSift_Historic objects.
  * @throws DataSift_Exception_InvalidData
  * @throws DataSift_Exception_APIError
  * @throws DataSift_Exception_AccessDenied
  */
 public function listHistorics($page = 1, $per_page = 20)
 {
     return DataSift_Historic::listHistorics($this, $page, $per_page);
 }