]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Route and stub for new friendships/show API method
authorZach Copley <zach@controlyourself.ca>
Fri, 3 Jul 2009 00:32:27 +0000 (17:32 -0700)
committerZach Copley <zach@controlyourself.ca>
Fri, 3 Jul 2009 00:32:27 +0000 (17:32 -0700)
actions/twitapifriendships.php
lib/router.php

index 29eb4cc0ff007f49b5346789d60a9a4c0397c814..35e0164318b03e0aac0b0f2fd91f90f329491eac 100644 (file)
@@ -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
index 784ea988237dec40aacf38193335bafc100c1051..50b733453e1d1266dfc9d7538500169a6dc1dea2 100644 (file)
@@ -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