Ticket #1108 - Added 'social graph' methods to the API

This commit is contained in:
Zach Copley
2009-02-22 20:04:47 -08:00
parent 5e646ead49
commit cab322d21b
2 changed files with 74 additions and 7 deletions

View File

@@ -265,6 +265,33 @@ class Router
'apiaction' => 'friendships'),
array('method' => 'exists(\.(xml|json|rss|atom))'));
// Social graph
$m->connect('api/friends/ids/:argument',
array('action' => 'api',
'apiaction' => 'statuses',
'method' => 'friendsIDs'));
foreach (array('xml', 'json') as $e) {
$m->connect('api/friends/ids.'.$e,
array('action' => 'api',
'apiaction' => 'statuses',
'method' => 'friendsIDs.'.$e));
}
$m->connect('api/followers/ids/:argument',
array('action' => 'api',
'apiaction' => 'statuses',
'method' => 'followersIDs'));
foreach (array('xml', 'json') as $e) {
$m->connect('api/followers/ids.'.$e,
array('action' => 'api',
'apiaction' => 'statuses',
'method' => 'followersIDs.'.$e));
}
// account
$m->connect('api/account/:method',