diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-08-03 22:47:57 +0000 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2009-08-03 22:47:57 +0000 |
commit | dccd4aa68d7ae449434c63380f21d8070913778f (patch) | |
tree | 1a25d40f20326047eb0776f910e155362e8e33cb /actions/twitapigroups.php | |
parent | 981fa1b33a8073bd0d53d8bee7dfccd171685e61 (diff) | |
parent | ff6e976d0315c57fc5b7e31845e9a3bad4f095bc (diff) |
Merge branch '0.8.x' into twitter-oauth
Diffstat (limited to 'actions/twitapigroups.php')
-rw-r--r-- | actions/twitapigroups.php | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/actions/twitapigroups.php b/actions/twitapigroups.php index 71a0776f4..82604ebff 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); @@ -88,8 +114,7 @@ require_once INSTALLDIR.'/lib/twitterapi.php'; $this->show_xml_timeline($notice); break; case 'rss': - $this->show_rss_timeline($notice, $title, $link, - $subtitle, $suplink); + $this->show_rss_timeline($notice, $title, $link, $subtitle); break; case 'atom': if (isset($apidata['api_arg'])) { @@ -101,7 +126,7 @@ require_once INSTALLDIR.'/lib/twitterapi.php'; 'api/laconica/groups/timeline.atom'; } $this->show_atom_timeline($notice, $title, $id, $link, - $subtitle, $suplink, $selfuri); + $subtitle, null, $selfuri); break; case 'json': $this->show_json_timeline($notice); |