*
* @category API
* @package StatusNet
+ * @author Craig Andrews <candrews@integralblue.com>
+ * @author Evan Prodromou <evan@status.net>
+ * @author Jeffery To <jeffery.to@gmail.com>
* @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
exit(1);
}
-require_once INSTALLDIR.'/lib/twitterapi.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 <candrews@integralblue.com>
+ * @author Evan Prodromou <evan@status.net>
+ * @author Jeffery To <jeffery.to@gmail.com>
* @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/
*/
-class ApiTimelineTagAction extends TwitterapiAction
+class ApiTimelineTagAction extends ApiPrivateAuthAction
{
var $notices = null;
{
parent::prepare($args);
- $this->page = (int)$this->arg('page', 1);
- $this->count = (int)$this->arg('count', 20);
- $this->tag = $this->arg('tag');
- $this->format = $this->arg('format');
-
+ $this->tag = $this->arg('tag');
$this->notices = $this->getNotices();
return true;
{
$sitename = common_config('site', 'name');
$title = sprintf(_("Notices tagged with %s"), $this->tag);
- $link = common_local_url('tag',
- array('tag' => $this->tag));
- $subtitle = sprintf(_('Updates tagged with %1$s on %2$s!'),
- $this->tag, $sitename);
+ $link = common_local_url(
+ 'tag',
+ array('tag' => $this->tag)
+ );
+ $subtitle = sprintf(
+ _('Updates tagged with %1$s on %2$s!'),
+ $this->tag,
+ $sitename
+ );
$taguribase = common_config('integration', 'taguri');
$id = "tag:$taguribase:TagTimeline:".$tag;
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->notices, $title, $id, $link,
- $subtitle, null, $selfuri
+ $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);