From 11086c78239a30dc47622837a2800d899ebf9b0f Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Fri, 7 Aug 2009 18:00:04 -0400 Subject: 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 --- lib/router.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'lib/router.php') diff --git a/lib/router.php b/lib/router.php index 19839b997..9ab46856d 100644 --- a/lib/router.php +++ b/lib/router.php @@ -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')); -- cgit v1.2.3-54-g00ecf