summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-03-04 18:14:52 -0800
committerZach Copley <zach@controlyourself.ca>2009-03-04 18:14:52 -0800
commit38b6946349d39359ce9f4b5ec37967a48e192862 (patch)
treed3d867235c2b603c37ea4d903b60aee4b4bc9a65 /lib
parent344f7194f0b7be60c8cfc616db39f748a914d0ed (diff)
Stubs for Twitter-compatible API search methods
Diffstat (limited to 'lib')
-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',