From: Zach Copley Date: Fri, 3 Jul 2009 00:32:27 +0000 (-0700) Subject: Route and stub for new friendships/show API method X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=acb4c783463660710e894ecb54ebaebb3d1ae77c;p=quix0rs-gnu-social.git Route and stub for new friendships/show API method --- diff --git a/actions/twitapifriendships.php b/actions/twitapifriendships.php index 29eb4cc0ff..35e0164318 100644 --- a/actions/twitapifriendships.php +++ b/actions/twitapifriendships.php @@ -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"; + + } + } \ No newline at end of file diff --git a/lib/router.php b/lib/router.php index 784ea98823..50b733453e 100644 --- a/lib/router.php +++ b/lib/router.php @@ -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