Routes for friendships actions

This commit is contained in:
Zach Copley 2009-10-05 10:04:35 -07:00
parent 4ed8055f86
commit ee207ffd8b

View File

@ -388,15 +388,31 @@ class Router
// friendships // friendships
$m->connect('api/friendships/:method/:argument', $m->connect('api/friendships/show.:format',
array('action' => 'api', array('action' => 'ApiFriendshipsShow',
'apiaction' => 'friendships'), 'format' => '(xml|json)'));
array('method' => '(create|destroy)'));
$m->connect('api/friendships/:method', $m->connect('api/friendships/exists.:format',
array('action' => 'api', array('action' => 'ApiFriendshipsExists',
'apiaction' => 'friendships'), 'format' => '(xml|json)'));
array('method' => '(show|exists)(\.(xml|json))'));
$m->connect('api/friendships/create.:format',
array('action' => 'ApiFriendshipsCreate',
'format' => '(xml|json)'));
$m->connect('api/friendships/destroy.:format',
array('action' => 'ApiFriendshipsDestroy',
'format' => '(xml|json)'));
$m->connect('api/friendships/create/:id.:format',
array('action' => 'ApiFriendshipsCreate',
'id' => '[a-zA-Z0-9]+',
'format' => '(xml|json)'));
$m->connect('api/friendships/destroy/:id.:format',
array('action' => 'ApiFriendshipsDestroy',
'id' => '[a-zA-Z0-9]+',
'format' => '(xml|json)'));
// Social graph // Social graph