summaryrefslogtreecommitdiff
path: root/lib/router.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-08-07 18:00:04 -0400
committerCraig Andrews <candrews@integralblue.com>2009-08-07 18:00:04 -0400
commit11086c78239a30dc47622837a2800d899ebf9b0f (patch)
tree94e5f2a8bff5d20008731aa293753cc24a6dcc7d /lib/router.php
parent63cedb7c31078d018069640a1a4b00d9de45e89c (diff)
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
Diffstat (limited to 'lib/router.php')
-rw-r--r--lib/router.php22
1 files changed, 22 insertions, 0 deletions
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'));