forked from GNUsocial/gnu-social
Ticket #1108 - Added 'social graph' methods to the API
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user