*
* @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';
/**
* Outputs detailed information about the group specified by ID
*
* @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 ApiGroupShowAction extends TwitterApiAction
+class ApiGroupShowAction extends ApiPrivateAuthAction
{
- var $format = null;
var $group = null;
/**
{
parent::prepare($args);
- $this->format = $this->arg('format');
$this->group = $this->getTargetGroup($this->arg('id'));
return true;
if (empty($this->group)) {
$this->clientError(
- 'Group not found!',
+ _('Group not found!'),
404,
$this->format
);
switch($this->format) {
case 'xml':
- $this->show_single_xml_group($this->group);
+ $this->showSingleXmlGroup($this->group);
break;
case 'json':
- $this->show_single_json_group($this->group);
+ $this->showSingleJsonGroup($this->group);
break;
default:
- $this->clientError(_('API method not found!'), 404, $this->format);
+ $this->clientError(_('API method not found.'), 404, $this->format);
break;
}
return null;
}
+ /**
+ * Return true if read only.
+ *
+ * MAY override
+ *
+ * @param array $args other arguments
+ *
+ * @return boolean is read only action?
+ */
+
+ function isReadOnly($args)
+ {
+ return true;
+ }
+
}