diff options
author | Zach Copley <zach@status.net> | 2009-09-27 17:23:11 -0700 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2009-09-27 17:23:11 -0700 |
commit | d392cbed7d4ba2f280211177eb99830bd3b61b04 (patch) | |
tree | 5a8e1a05fefd7bdce3e5fd7f9e6726276475047c /lib | |
parent | 44dd8f833dca4ab0b076a7fc7d16fdfed317b41f (diff) |
Route aliases: replies -> mentions and home_timeline -> friends_timeline
Diffstat (limited to 'lib')
-rw-r--r-- | lib/router.php | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/lib/router.php b/lib/router.php index b9c616222..91cdd2cf8 100644 --- a/lib/router.php +++ b/lib/router.php @@ -278,6 +278,14 @@ class Router array('action' => 'ApiFriendsTimeline', 'id' => '[a-zA-Z0-9]+', 'format' => '(xml|json|rss|atom)')); + $m->connect('api/statuses/home_timeline.:format', + array('action' => 'ApiFriendsTimeline', + 'format' => '(xml|json|rss|atom)')); + + $m->connect('api/statuses/home_timeline/:id.:format', + array('action' => 'ApiFriendsTimeline', + 'id' => '[a-zA-Z0-9]+', + 'format' => '(xml|json|rss|atom)')); $m->connect('api/statuses/user_timeline.:format', array('action' => 'ApiUserTimeline', @@ -297,18 +305,27 @@ class Router 'id' => '[a-zA-Z0-9]+', 'format' => '(xml|json|rss|atom)')); + $m->connect('api/statuses/replies.:format', + array('action' => 'ApiMentions', + 'format' => '(xml|json|rss|atom)')); + + $m->connect('api/statuses/replies/:id.:format', + array('action' => 'ApiMentions', + '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' => '(update|replies|show|friends|followers|featured)(\.(atom|rss|xml|json))?')); + array('method' => '(update|show|friends|followers|featured)(\.(atom|rss|xml|json))?')); $m->connect('api/statuses/:method/:argument', array('action' => 'api', 'apiaction' => 'statuses'), - array('method' => '(replies|show|destroy|friends|followers)')); + array('method' => '(show|destroy|friends|followers)')); // users |