X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapitimelinefriends.php;h=0e356bb18be2bc08ba7eea5441b12fc32778ae3f;hb=a7b6f7a6698f646c3e9962b15d8d2c570b48a5a7;hp=71049f6eb104407ea5571f85153c10c58baa8c29;hpb=9e9b7b972c5c2365f1861327600a02e4aaa7c430;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);