X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapitimelinefriends.php;h=0e356bb18be2bc08ba7eea5441b12fc32778ae3f;hb=7cf12f093ed48849ec901038b4cfd44595343c06;hp=71049f6eb104407ea5571f85153c10c58baa8c29;hpb=8d0c014ced78b3b6328105e2a82e3776059b600a;p=quix0rs-gnu-social.git diff --git a/actions/apitimelinefriends.php b/actions/apitimelinefriends.php index 71049f6eb1..0e356bb18b 100644 --- a/actions/apitimelinefriends.php +++ b/actions/apitimelinefriends.php @@ -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);