* @author Jeffery To <jeffery.to@gmail.com>
* @author Zach Copley <zach@status.net>
* @copyright 2009 StatusNet, Inc.
+ * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
exit(1);
}
-require_once INSTALLDIR . '/lib/api.php';
+require_once INSTALLDIR . '/lib/apiprivateauth.php';
/**
* List 20 newest members of the group specified by name or ID.
* @link http://status.net/
*/
-class ApiGroupMembershipAction extends ApiAction
+class ApiGroupMembershipAction extends ApiPrivateAuthAction
{
var $group = null;
var $profiles = null;
{
parent::handle($args);
+ if (empty($this->group)) {
+ $this->clientError(_('Group not found.'), 404, $this->format);
+ return false;
+ }
+
// XXX: RSS and Atom
switch($this->format) {
break;
default:
$this->clientError(
- _('API method not found!'),
+ _('API method not found.'),
404,
$this->format
);
($this->page - 1) * $this->count,
$this->count,
$this->since_id,
- $this->max_id,
- $this->since
+ $this->max_id
);
while ($profile->fetch()) {
return '"' . implode(
':',
array($this->arg('action'),
+ common_user_cache_hash($this->auth_user),
common_language(),
$this->group->id,
strtotime($this->profiles[0]->created),