From ec103b90e39c20bfdc2f5663e35eae8b1df212e9 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Thu, 30 Jul 2009 22:15:24 -0400 Subject: Implemented the "show" method of the laconica groups api --- actions/twitapigroups.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'actions/twitapigroups.php') diff --git a/actions/twitapigroups.php b/actions/twitapigroups.php index 71a0776f4..f899bc369 100644 --- a/actions/twitapigroups.php +++ b/actions/twitapigroups.php @@ -51,6 +51,32 @@ require_once INSTALLDIR.'/lib/twitterapi.php'; class TwitapigroupsAction extends TwitterapiAction { + function show($args, $apidata) + { + parent::handle($args); + + common_debug("in groups api action"); + + $this->auth_user = $apidata['user']; + $group = $this->get_group($apidata['api_arg'], $apidata); + + if (empty($group)) { + $this->clientError('Not Found', 404, $apidata['content-type']); + return; + } + + switch($apidata['content-type']) { + case 'xml': + $this->show_single_xml_group($group); + break; + case 'json': + $this->show_single_json_group($group); + break; + default: + $this->clientError(_('API method not found!'), $code = 404); + } + } + function timeline($args, $apidata) { parent::handle($args); -- cgit v1.2.3-54-g00ecf