]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/twitapigroups.php
Make RSS 1.0 channel descriptions more consistent with RSS 2.0 and Atom descriptions
[quix0rs-gnu-social.git] / actions / twitapigroups.php
index 71a0776f465320d63587e460e163c1390964572b..82604ebff2b90a44a6fb6fbdfb55a1187b0e947b 100644 (file)
@@ -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);