Source for file video.php

Documentation is available at video.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Platform
  4.  * @subpackage  Facebook
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE
  8.  */
  9.  
  10.  
  11. defined('JPATH_PLATFORM'or die();
  12.  
  13.  
  14. /**
  15.  * Facebook API Video class for the Joomla Platform.
  16.  *
  17.  * @package     Joomla.Platform
  18.  * @subpackage  Facebook
  19.  *
  20.  * @see         http://developers.facebook.com/docs/reference/api/video/
  21.  * @since       13.1
  22.  */
  23. {
  24.     /**
  25.      * Method to get a video. Requires authentication and user_videos or friends_videos permission for private videos.
  26.      *
  27.      * @param   string  $video  The video id.
  28.      *
  29.      * @return  mixed   The decoded JSON response or false if the client is not authenticated.
  30.      *
  31.      * @since   13.1
  32.      */
  33.     public function getVideo($video)
  34.     {
  35.         return $this->get($video);
  36.     }
  37.  
  38.     /**
  39.      * Method to get a video's comments. Requires authentication and user_videos or friends_videos permission for private videos.
  40.      *
  41.      * @param   string   $video   The video id.
  42.      * @param   integer  $limit   The number of objects per page.
  43.      * @param   integer  $offset  The object's number on the page.
  44.      * @param   string   $until   A unix timestamp or any date accepted by strtotime.
  45.      * @param   string   $since   A unix timestamp or any date accepted by strtotime.
  46.      *
  47.      * @return  mixed   The decoded JSON response or false if the client is not authenticated.
  48.      *
  49.      * @since   13.1
  50.      */
  51.     public function getComments($video$limit=0$offset=0$until=null$since=null)
  52.     {
  53.         return $this->getConnection($video'comments'''$limit$offset$until$since);
  54.     }
  55.  
  56.     /**
  57.      * Method to comment on a video. Requires authentication and publish_stream permission, user_videos or friends_videos permission for private videos.
  58.      *
  59.      * @param   string  $video    The video id.
  60.      * @param   string  $message  The comment's text.
  61.      *
  62.      * @return  mixed   The decoded JSON response or false if the client is not authenticated.
  63.      *
  64.      * @since   13.1
  65.      */
  66.     public function createComment($video$message)
  67.     {
  68.         // Set POST request parameters.
  69.         $data array();
  70.         $data['message'$message;
  71.  
  72.         return $this->createConnection($video'comments'$data);
  73.     }
  74.  
  75.     /**
  76.      * Method to delete a comment. Requires authentication and publish_stream permission, user_videos or friends_videos permission for private videos.
  77.      *
  78.      * @param   string  $comment  The comment's id.
  79.      *
  80.      * @return  boolean Returns true if successful, and false otherwise.
  81.      *
  82.      * @since   13.1
  83.      */
  84.     public function deleteComment($comment)
  85.     {
  86.         return $this->deleteConnection($comment);
  87.     }
  88.  
  89.     /**
  90.      * Method to get video's likes. Requires authentication and user_videos or friends_videos permission for private videos.
  91.      *
  92.      * @param   string   $video   The video id.
  93.      * @param   integer  $limit   The number of objects per page.
  94.      * @param   integer  $offset  The object's number on the page.
  95.      * @param   string   $until   A unix timestamp or any date accepted by strtotime.
  96.      * @param   string   $since   A unix timestamp or any date accepted by strtotime.
  97.      *
  98.      * @return  mixed   The decoded JSON response or false if the client is not authenticated.
  99.      *
  100.      * @since   13.1
  101.      */
  102.     public function getLikes($video$limit=0$offset=0$until=null$since=null)
  103.     {
  104.         return $this->getConnection($video'likes'''$limit$offset$until$since);
  105.     }
  106.  
  107.     /**
  108.      * Method to like a video. Requires authentication and publish_stream permission, user_videos or friends_videos permission for private videos.
  109.      *
  110.      * @param   string  $video  The video id.
  111.      *
  112.      * @return  boolean Returns true if successful, and false otherwise.
  113.      *
  114.      * @since   13.1
  115.      */
  116.     public function createLike($video)
  117.     {
  118.         return $this->createConnection($video'likes');
  119.     }
  120.  
  121.     /**
  122.      * Method to unlike a video. Requires authentication and publish_stream permission, user_videos or friends_videos permission for private videos.
  123.      *
  124.      * @param   string  $video  The video id.
  125.      *
  126.      * @return  boolean Returns true if successful, and false otherwise.
  127.      *
  128.      * @since   13.1
  129.      */
  130.     public function deleteLike($video)
  131.     {
  132.         return $this->deleteConnection($video'likes');
  133.     }
  134.  
  135.     /**
  136.      * Method to get the album-sized view of the video. Requires authentication and user_videos or friends_videos permission for private photos.
  137.      *
  138.      * @param   string  $video  The video id.
  139.      *
  140.      * @return  string  URL of the picture.
  141.      *
  142.      * @since   13.1
  143.      */
  144.     public function getPicture($video)
  145.     {
  146.         return $this->getConnection($video'picture');
  147.     }
  148. }

Documentation generated on Tue, 19 Nov 2013 15:16:46 +0100 by phpDocumentor 1.4.3