X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapitimelinetag.php;h=452593c116a905db7f916685b38abe3df52b3869;hb=c899e4a84ee45b65950980ccb87e52129871d58e;hp=8211b01226b04ded65d63028077769710d83eea9;hpb=559918826a714c1ee2ecdc49dcfc2b67451a9864;p=quix0rs-gnu-social.git diff --git a/actions/apitimelinetag.php b/actions/apitimelinetag.php index 8211b01226..452593c116 100644 --- a/actions/apitimelinetag.php +++ b/actions/apitimelinetag.php @@ -21,6 +21,9 @@ * * @category API * @package StatusNet + * @author Craig Andrews + * @author Evan Prodromou + * @author Jeffery To * @author Zach Copley * @copyright 2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 @@ -31,19 +34,22 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR.'/lib/api.php'; +require_once INSTALLDIR . '/lib/apiprivateauth.php'; /** * Returns the 20 most recent notices tagged by a given tag * * @category API * @package StatusNet + * @author Craig Andrews + * @author Evan Prodromou + * @author Jeffery To * @author Zach Copley * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ -class ApiTimelineTagAction extends ApiAction +class ApiTimelineTagAction extends ApiPrivateAuthAction { var $notices = null; @@ -61,10 +67,7 @@ class ApiTimelineTagAction extends ApiAction { parent::prepare($args); - $this->page = (int)$this->arg('page', 1); - $this->count = (int)$this->arg('count', 20); - $this->tag = $this->arg('tag'); - + $this->tag = $this->arg('tag'); $this->notices = $this->getNotices(); return true; @@ -110,16 +113,16 @@ class ApiTimelineTagAction extends ApiAction 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() . 'api/statusnet/tags/timeline/' . $this->tag . '.atom'; - $this->show_atom_timeline( + $this->showAtomTimeline( $this->notices, $title, $id, @@ -130,7 +133,7 @@ class ApiTimelineTagAction extends ApiAction ); break; case 'json': - $this->show_json_timeline($this->notices); + $this->showJsonTimeline($this->notices); break; default: $this->clientError(_('API method not found!'), $code = 404);