forked from GNUsocial/gnu-social
Implemented the list_all and list groups API methods as defined at http://laconi.ca/trac/wiki/ProposedGroupsAPI
Made the Autocomplete plugin also autocomplete groups
This commit is contained in:
@@ -409,6 +409,28 @@ class Router
|
||||
'apiaction' => 'laconica'));
|
||||
|
||||
// Groups
|
||||
//'list' has to be handled differently, as php will not allow a method to be named 'list'
|
||||
$m->connect('api/laconica/groups/list/:argument',
|
||||
array('action' => 'api',
|
||||
'method' => 'list_groups',
|
||||
'apiaction' => 'groups'));
|
||||
foreach (array('xml', 'json', 'rss', 'atom') as $e) {
|
||||
$m->connect('api/laconica/groups/list.' . $e,
|
||||
array('action' => 'api',
|
||||
'method' => 'list_groups.' . $e,
|
||||
'apiaction' => 'groups'));
|
||||
}
|
||||
|
||||
$m->connect('api/laconica/groups/:method',
|
||||
array('action' => 'api',
|
||||
'apiaction' => 'statuses'),
|
||||
array('method' => '(list_all|)(\.(atom|rss|xml|json))?'));
|
||||
|
||||
$m->connect('api/statuses/:method/:argument',
|
||||
array('action' => 'api',
|
||||
'apiaction' => 'statuses'),
|
||||
array('method' => '(|user_timeline|friends_timeline|replies|mentions|show|destroy|friends|followers)'));
|
||||
|
||||
$m->connect('api/laconica/groups/:method/:argument',
|
||||
array('action' => 'api',
|
||||
'apiaction' => 'groups'));
|
||||
|
Reference in New Issue
Block a user