*
* @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
*
* @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 ApiGroupListAction extends ApiBareAuthAction
{
- var $format = null;
- var $user = null;
- var $page = null;
- var $count = null;
- var $max_id = null;
- var $since_id = null;
- var $since = null;
var $groups = null;
/**
{
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->user = $this->getTargetUser($id);
- $this->format = $this->arg('format');
$this->groups = $this->getGroups();
return true;
parent::handle($args);
if (empty($this->user)) {
- $this->clientError(_('No such user!'), 404, $this->format);
+ $this->clientError(_('No such user.'), 404, $this->format);
return;
}
switch($this->format) {
case 'xml':
- $this->show_xml_groups($this->groups);
+ $this->showXmlGroups($this->groups);
break;
case 'rss':
- $this->show_rss_groups($this->groups, $title, $link, $subtitle);
+ $this->showRssGroups($this->groups, $title, $link, $subtitle);
break;
case 'atom':
$selfuri = common_root_url() . 'api/statusnet/groups/list/' .
$this->user->id . '.atom';
- $this->show_atom_groups(
+ $this->showAtomGroups(
$this->groups,
$title,
$id,
);
break;
case 'json':
- $this->show_json_groups($this->groups);
+ $this->showJsonGroups($this->groups);
break;
default:
$this->clientError(