summaryrefslogtreecommitdiff
path: root/lib/router.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2009-09-23 13:45:51 -0700
committerZach Copley <zach@status.net>2009-09-23 13:45:51 -0700
commit49b701f9ec6d7795147f94c43eaf744a96efb199 (patch)
tree46dc86f74e9fec7a7386750a1295229abf8fae00 /lib/router.php
parentf3c8fcccc1c90b6741a15963f3c6429a906bc97c (diff)
Started refactoring API into individual actions
Diffstat (limited to 'lib/router.php')
-rw-r--r--lib/router.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/router.php b/lib/router.php
index 2c4d63b0d..0e5fe3a54 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -262,15 +262,27 @@ class Router
// statuses API
+ $m->connect('api/statuses/friends_timeline.:format',
+ array('action' => 'apifriendstimeline',
+ 'format' => '(xml|json|rss|atom)'));
+
+ $m->connect('api/statuses/friends_timeline/:id.:format',
+ array('action' => 'apifriendstimeline',
+ 'id' => '[a-zA-Z0-9]+',
+ 'format' => '(xml|json|rss|atom)'));
+
+ $m->connect('api/statuses/home_timeline',
+ array('action' => 'apifriendstimeline'));
+
$m->connect('api/statuses/:method',
array('action' => 'api',
'apiaction' => 'statuses'),
- array('method' => '(public_timeline|home_timeline|friends_timeline|user_timeline|update|replies|mentions|show|friends|followers|featured)(\.(atom|rss|xml|json))?'));
+ array('method' => '(public_timeline|user_timeline|update|replies|mentions|show|friends|followers|featured)(\.(atom|rss|xml|json))?'));
$m->connect('api/statuses/:method/:argument',
array('action' => 'api',
'apiaction' => 'statuses'),
- array('method' => '(user_timeline|home_timeline|friends_timeline|replies|mentions|show|destroy|friends|followers)'));
+ array('method' => '(user_timeline|replies|mentions|show|destroy|friends|followers)'));
// users