]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apitimelinehome.php
Merge branch '1.0.x' into testing
[quix0rs-gnu-social.git] / actions / apitimelinehome.php
index 75a9f725808d0549d285f17d6f9d8819210ebc14..023c9698a1d9fbf45910793e4edf1cb18b8a1896 100644 (file)
@@ -168,6 +168,14 @@ class ApiTimelineHomeAction 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);