]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apifriendshipsexists.php
Fix feed links which were broken when the API was restructured
[quix0rs-gnu-social.git] / actions / apifriendshipsexists.php
index 3d6e7448deec8f23a7a4998e06893818dda8b3ea..ae50c512c81b62fe8006b723affe25a6b96ffbcb 100644 (file)
@@ -21,6 +21,8 @@
  *
  * @category  API
  * @package   StatusNet
+ * @author    Dan Moore <dan@moore.cx>
+ * @author    Evan Prodromou <evan@status.net>
  * @author    Zach Copley <zach@status.net>
  * @copyright 2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
@@ -31,23 +33,23 @@ if (!defined('STATUSNET')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/twitterapi.php';
+require_once INSTALLDIR . '/lib/api.php';
 
 /**
- * Tests for the existence of friendship between two users. Will return true if 
+ * Tests for the existence of friendship between two users. Will return true if
  * user_a follows user_b, otherwise will return false.
  *
  * @category API
  * @package  StatusNet
+ * @author   Dan Moore <dan@moore.cx>
+ * @author   Evan Prodromou <evan@status.net>
  * @author   Zach Copley <zach@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
 
-class ApiFriendshipsExistsAction extends TwitterApiAction
+class ApiFriendshipsExistsAction extends ApiAction
 {
-
-    var $format = null;
     var $user_a = null;
     var $user_b = null;
 
@@ -64,8 +66,6 @@ class ApiFriendshipsExistsAction extends TwitterApiAction
     {
         parent::prepare($args);
 
-        $this->format = $this->arg('format');
-
         $user_a_id = $this->trimmed('user_a');
         $user_b_id = $this->trimmed('user_b');
 
@@ -111,14 +111,14 @@ class ApiFriendshipsExistsAction extends TwitterApiAction
 
         switch ($this->format) {
         case 'xml':
-            $this->init_document('xml');
+            $this->initDocument('xml');
             $this->element('friends', null, $result);
-            $this->end_document('xml');
+            $this->endDocument('xml');
             break;
         case 'json':
-            $this->init_document('json');
+            $this->initDocument('json');
             print json_encode($result);
-            $this->end_document('json');
+            $this->endDocument('json');
             break;
         default:
             break;