summaryrefslogtreecommitdiff
path: root/lib/router.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-08-24 16:55:49 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-08-24 16:55:49 -0400
commitff87732053bae38879988ba7d002a294998ccb4e (patch)
treeccccfe7fc8976baf1f0cd4438a57bf817dc4052c /lib/router.php
parent27aeba01dd366f15f7847267b7518fb873987ddb (diff)
parentf3cdc7f272e409d391979d3e6c58dd63573530c0 (diff)
Merge branch '0.8.x' into testing
Conflicts: actions/twitterauthorization.php lib/oauthclient.php lib/twitter.php lib/twitterapi.php lib/twitteroauthclient.php scripts/twitterstatusfetcher.php
Diffstat (limited to 'lib/router.php')
-rw-r--r--lib/router.php33
1 files changed, 24 insertions, 9 deletions
diff --git a/lib/router.php b/lib/router.php
index 6651773c0..04c6dd414 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -117,15 +117,8 @@ class Router
$m->connect('main/tagother/:id', array('action' => 'tagother'));
- $m->connect('main/oembed.xml',
- array('action' => 'api',
- 'method' => 'oembed.xml',
- 'apiaction' => 'oembed'));
-
- $m->connect('main/oembed.json',
- array('action' => 'api',
- 'method' => 'oembed.json',
- 'apiaction' => 'oembed'));
+ $m->connect('main/oembed',
+ array('action' => 'oembed'));
// these take a code
@@ -413,6 +406,28 @@ class Router
'apiaction' => 'laconica'));
// Groups
+ //'list' has to be handled differently, as php will not allow a method to be named 'list'
+ $m->connect('api/laconica/groups/list/:argument',
+ array('action' => 'api',
+ 'method' => 'list_groups',
+ 'apiaction' => 'groups'));
+ foreach (array('xml', 'json', 'rss', 'atom') as $e) {
+ $m->connect('api/laconica/groups/list.' . $e,
+ array('action' => 'api',
+ 'method' => 'list_groups.' . $e,
+ 'apiaction' => 'groups'));
+ }
+
+ $m->connect('api/laconica/groups/:method',
+ array('action' => 'api',
+ 'apiaction' => 'statuses'),
+ array('method' => '(list_all|)(\.(atom|rss|xml|json))?'));
+
+ $m->connect('api/statuses/:method/:argument',
+ array('action' => 'api',
+ 'apiaction' => 'statuses'),
+ array('method' => '(|user_timeline|friends_timeline|replies|mentions|show|destroy|friends|followers)'));
+
$m->connect('api/laconica/groups/:method/:argument',
array('action' => 'api',
'apiaction' => 'groups'));