X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapitimelinepublic.php;h=353973b6533a9d76fe25008a773db90dbb716272;hb=a390e3e888b4e78818ce5c5d0315b4128939c2d1;hp=2745e5d3fe969cf70269901d706809ab73af0378;hpb=0b1f48ebd0fcfed50d2110b7731196e9adcc04a6;p=quix0rs-gnu-social.git diff --git a/actions/apitimelinepublic.php b/actions/apitimelinepublic.php index 2745e5d3fe..353973b653 100644 --- a/actions/apitimelinepublic.php +++ b/actions/apitimelinepublic.php @@ -234,6 +234,14 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction 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);