Ejemplo n.º 1
0
 /**
  * @param $id
  * @return array
  */
 public static function getComments($id)
 {
     $result = [];
     $params = ['data' => json_encode(['widget_id' => 8868, 'link' => 'http://rutube.ru/video/' . $id . '/', 'stream' => 'streamstart', 'xid' => $id, 'limit' => 50, 'filter' => 'all', 'reverse' => true, 'hypertext' => false]), 'host' => 'http://rutube.ru'];
     $response = Request::getComments($params);
     $data = $response->data;
     if (isset($data[1])) {
         $data = json_decode($data[1], 1);
         if (isset($data['comments']) && json_last_error() === JSON_ERROR_NONE) {
             $result = $data['comments'];
         }
     }
     return $result;
 }
Ejemplo n.º 2
0
 /**
  * Статусы файлов:
  * 0 - доступен,
  * 1 - удалён
  *
  * File status:
  * 0 - available,
  * 1 - deleted
  *
  *
  * @param $videoId
  * @return mixed
  */
 public static function getVideoFileInfo($videoId)
 {
     return Request::getVideoFileInfo($videoId);
 }
Ejemplo n.º 3
0
 /**
  * @param $videoId
  * @param $timestamp
  * @return mixed
  */
 public function changeVideoPublicationDatetime($videoId, $timestamp)
 {
     $params = ['video' => $videoId, 'timestamp' => $timestamp];
     return Request::changeVideoPublicationDatetime($params, $this->getToken(), $this->getSecure());
 }