]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apitimelinefriends.php
Merge branch '1.0.x' into testing
[quix0rs-gnu-social.git] / actions / apitimelinefriends.php
index 71049f6eb104407ea5571f85153c10c58baa8c29..0e356bb18be2bc08ba7eea5441b12fc32778ae3f 100644 (file)
@@ -263,6 +263,14 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
         case 'json':
             $this->showJsonTimeline($this->notices);
             break;
+        case 'as':
+            header('Content-Type: application/json; charset=utf-8');
+            $doc = new ActivityStreamJSONDocument($this->auth_user);
+            $doc->setTitle($title);
+            $doc->addLink($link,'alternate', 'text/html');
+            $doc->addItemsFromNotices($this->notices);
+            $this->raw($doc->asString());
+            break;
         default:
             // TRANS: Client error displayed when trying to handle an unknown API method.
             $this->clientError(_('API method not found.'), $code = 404);