X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapitimelinefavorites.php;h=e2cb7c2ee2f8481221c42500b664959b2893d5e1;hb=0e439117a75698629c5066d0241ab41dc07b5ee1;hp=c952c4623870e91d882fc68d8f3721b14aeb4cc5;hpb=9e9b7b972c5c2365f1861327600a02e4aaa7c430;p=quix0rs-gnu-social.git diff --git a/actions/apitimelinefavorites.php b/actions/apitimelinefavorites.php index c952c46238..e2cb7c2ee2 100644 --- a/actions/apitimelinefavorites.php +++ b/actions/apitimelinefavorites.php @@ -169,8 +169,16 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction case 'json': $this->showJsonTimeline($this->notices); break; + case 'as': + header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE); + $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. + // TRANS: Client error displayed when coming across a non-supported API method. $this->clientError(_('API method not found.'), $code = 404); break; }