diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-08-21 16:27:43 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-08-21 16:27:43 -0400 |
commit | 9f356b55c6f419468771c0f3c2450010c0242abe (patch) | |
tree | 4cd175c7ef96380b5be82722581d63cf2f2fcb30 /lib/router.php | |
parent | 5dc1291b59a1079cbe9bab05d12dae06b8e4c96d (diff) | |
parent | a645d0468b368c7c659b440f72ec80498055ac3e (diff) |
Merge branch '0.9.x' into openidplugin
Conflicts:
actions/login.php
actions/register.php
Diffstat (limited to 'lib/router.php')
-rw-r--r-- | lib/router.php | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/lib/router.php b/lib/router.php index 90ffaec16..08bc0566d 100644 --- a/lib/router.php +++ b/lib/router.php @@ -86,6 +86,10 @@ class Router $m->connect('doc/:title', array('action' => 'doc')); + // Twitter + + $m->connect('twitter/authorization', array('action' => 'twitterauthorization')); + // facebook $m->connect('facebook', array('action' => 'facebookhome')); @@ -111,15 +115,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 @@ -406,6 +403,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')); |