diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-03-06 16:17:58 -0800 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-03-06 16:17:58 -0800 |
commit | 13c183e2f4e0738233658ca79103bbe4a6d57992 (patch) | |
tree | 298b18c43906919b2ee615e20f3507f333354575 /lib/router.php | |
parent | 9a2f3358537566084a29fd421891fbc236185e9f (diff) | |
parent | 0617c7b7730e4e42cd6285737f9fe999688fbdc6 (diff) |
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'lib/router.php')
-rw-r--r-- | lib/router.php | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/router.php b/lib/router.php index 1d1a5ba4c..aab286721 100644 --- a/lib/router.php +++ b/lib/router.php @@ -234,14 +234,15 @@ class Router // users - $m->connect('api/users/show/:argument', + $m->connect('api/users/:method/:argument', array('action' => 'api', - 'apiaction' => 'users')); + 'apiaction' => 'users'), + array('method' => 'show(\.(xml|json))?')); $m->connect('api/users/:method', array('action' => 'api', 'apiaction' => 'users'), - array('method' => 'show(\.(xml|json|atom|rss))?')); + array('method' => 'show(\.(xml|json))?')); // direct messages @@ -356,9 +357,15 @@ class Router array('action' => 'api', 'apiaction' => 'laconica')); + + // search + $m->connect('api/search.atom', array('action' => 'twitapisearchatom')); + $m->connect('api/search.json', array('action' => 'twitapisearchjson')); + $m->connect('api/trends.json', array('action' => 'twitapitrends')); + // user stuff - foreach (array('subscriptions', 'subscribers', + foreach (array('subscriptions', 'subscribers', 'nudge', 'xrds', 'all', 'foaf', 'replies', 'inbox', 'outbox', 'microsummary') as $a) { $m->connect(':nickname/'.$a, @@ -398,6 +405,8 @@ class Router array('action' => 'showstream'), array('nickname' => '[a-zA-Z0-9]{1,64}')); + Event::handle('RouterInitialized', array($m)); + return $m; } |