summaryrefslogtreecommitdiff
path: root/lib/router.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/router.php')
-rw-r--r--lib/router.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/router.php b/lib/router.php
index da57f8417..41c376a72 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -230,7 +230,7 @@ class Router
$m->connect('api/users/:method/:argument',
array('action' => 'api',
- 'apiaction' => 'users'),
+ 'apiaction' => 'users'),
array('method' => 'show(\.(xml|json))?'));
$m->connect('api/users/:method',
@@ -284,14 +284,14 @@ class Router
array('action' => 'api',
'apiaction' => 'statuses',
'method' => 'friendsIDs'));
-
+
foreach (array('xml', 'json') as $e) {
$m->connect('api/friends/ids.'.$e,
array('action' => 'api',
'apiaction' => 'statuses',
'method' => 'friendsIDs.'.$e));
}
-
+
$m->connect('api/followers/ids/:argument',
array('action' => 'api',
'apiaction' => 'statuses',
@@ -305,11 +305,11 @@ class Router
}
// account
-
+
$m->connect('api/account/:method',
array('action' => 'api',
'apiaction' => 'account'));
-
+
// favorites
$m->connect('api/favorites/:method/:argument',
@@ -352,6 +352,16 @@ class Router
array('action' => 'api',
'apiaction' => 'laconica'));
+
+ // search
+
+ foreach (array('json', 'atom') as $e) {
+ $m->connect('api/search.'.$e,
+ array('action' => 'twitapisearch'));
+ }
+
+ $m->connect('api/trends.json', array('action' => 'twitapitrends'));
+
// user stuff
foreach (array('subscriptions', 'subscribers',