]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apitimelinefavorites.php
show forwards in the inbox
[quix0rs-gnu-social.git] / actions / apitimelinefavorites.php
index 35a996c9cb3f7373b4a2836db8f1e8ddca2d94a1..f84d7b4cb7eee65ff23aa300576757efd1184d5c 100644 (file)
@@ -21,8 +21,9 @@
  *
  * @category  API
  * @package   StatusNet
- * @author    Zach Copley <zach@status.net>
- * @copyright 2009 StatusNet, Inc.
+ * @author    Craig Andrews <candrews@integralblue.com>
+ * @author    Evan Prodromou <evan@status.net>
+ * @author    Zach Copley <zach@status.net> * @copyright 2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link      http://status.net/
  */
@@ -39,6 +40,8 @@ require_once INSTALLDIR.'/lib/apibareauth.php';
  *
  * @category API
  * @package  StatusNet
+ * @author   Craig Andrews <candrews@integralblue.com>
+ * @author   Evan Prodromou <evan@status.net>
  * @author   Zach Copley <zach@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
@@ -46,15 +49,7 @@ require_once INSTALLDIR.'/lib/apibareauth.php';
 
 class ApiTimelineFavoritesAction extends ApiBareAuthAction
 {
-
-    var $user     = null;
     var $notices  = null;
-    var $format   = null;
-    var $page     = null;
-    var $count    = null;
-    var $max_id   = null;
-    var $since_id = null;
-    var $since    = null;
 
     /**
      * Take arguments for running
@@ -69,17 +64,10 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction
     {
         parent::prepare($args);
 
-        $this->page     = (int)$this->arg('page', 1);
-        $this->count    = (int)$this->arg('count', 20);
-        $this->max_id   = (int)$this->arg('max_id', 0);
-        $this->since_id = (int)$this->arg('since_id', 0);
-        $this->since    = $this->arg('since');
-        $this->format   = $this->arg('format');
-
         $this->user = $this->getTargetUser($this->arg('id'));
 
         if (empty($this->user)) {
-            $this->clientError(_('No such user!'), 404, $this->format);
+            $this->clientError(_('No such user.'), 404, $this->format);
             return;
         }
 
@@ -136,21 +124,21 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction
 
         switch($this->format) {
         case 'xml':
-            $this->show_xml_timeline($this->notices);
+            $this->showXmlTimeline($this->notices);
             break;
         case 'rss':
-            $this->show_rss_timeline($this->notices, $title, $link, $subtitle);
+            $this->showRssTimeline($this->notices, $title, $link, $subtitle);
             break;
         case 'atom':
             $selfuri = common_root_url() .
                 ltrim($_SERVER['QUERY_STRING'], 'p=');
-            $this->show_atom_timeline(
+            $this->showAtomTimeline(
                 $this->notices, $title, $id, $link, $subtitle,
                 null, $selfuri
             );
             break;
         case 'json':
-            $this->show_json_timeline($this->notices);
+            $this->showJsonTimeline($this->notices);
             break;
         default:
             $this->clientError(_('API method not found!'), $code = 404);