Route and stub for new friendships/show API method

This commit is contained in:
Zach Copley 2009-07-02 17:32:27 -07:00
parent c02acd7341
commit acb4c78346
2 changed files with 15 additions and 1 deletions

View File

@ -160,4 +160,18 @@ class TwitapifriendshipsAction extends TwitterapiAction
}
function show($args, $apidata)
{
parent::handle($args);
if (!in_array($apidata['content-type'], array('xml', 'json'))) {
$this->clientError(_('API method not found!'), $code = 404);
return;
}
print "gar";
}
}

View File

@ -317,7 +317,7 @@ class Router
$m->connect('api/friendships/:method',
array('action' => 'api',
'apiaction' => 'friendships'),
array('method' => 'exists(\.(xml|json))'));
array('method' => '(show|exists)(\.(xml|json))'));
// Social graph