From cab322d21b8c8077192a1396bf13050d734c2aba Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Sun, 22 Feb 2009 20:04:47 -0800 Subject: Ticket #1108 - Added 'social graph' methods to the API --- lib/router.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'lib') diff --git a/lib/router.php b/lib/router.php index a41d35f22..b18a5523e 100644 --- a/lib/router.php +++ b/lib/router.php @@ -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', -- cgit v1.2.3-54-g00ecf