diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-07-02 17:32:27 -0700 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2009-07-02 17:32:27 -0700 |
commit | acb4c783463660710e894ecb54ebaebb3d1ae77c (patch) | |
tree | 279419a018d4c6f8985bfabb36e55ceadbfd7637 | |
parent | c02acd7341cc3104b75a56e0b8dfd4811e77e278 (diff) |
Route and stub for new friendships/show API method
-rw-r--r-- | actions/twitapifriendships.php | 14 | ||||
-rw-r--r-- | lib/router.php | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/actions/twitapifriendships.php b/actions/twitapifriendships.php index 29eb4cc0f..35e016431 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 784ea9882..50b733453 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 |