X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapitimelinetag.php;h=31e18cf8ee8d28aa00da47fba7970405d4f57736;hb=dbc6d607ce08a0dc4fcd2931b31ab66589d15878;hp=4dbe1fc0dbcb9d865884eb4ff3a3e494ea71facb;hpb=04ae500749ea2e5937ac1f28ef8c7edf4f99f0a1;p=quix0rs-gnu-social.git diff --git a/actions/apitimelinetag.php b/actions/apitimelinetag.php index 4dbe1fc0db..31e18cf8ee 100644 --- a/actions/apitimelinetag.php +++ b/actions/apitimelinetag.php @@ -107,7 +107,7 @@ class ApiTimelineTagAction extends ApiPrivateAuthAction $sitename ); $taguribase = TagURI::base(); - $id = "tag:$taguribase:TagTimeline:".$tag; + $id = "tag:$taguribase:TagTimeline:".$this->tag; $link = common_local_url( 'tag', @@ -116,8 +116,6 @@ class ApiTimelineTagAction extends ApiPrivateAuthAction $self = $this->getSelfUri(); - common_debug("self link is: $self"); - switch($this->format) { case 'xml': $this->showXmlTimeline($this->notices); @@ -154,8 +152,16 @@ class ApiTimelineTagAction extends ApiPrivateAuthAction 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; }