ActivityStreamJSONDocument served as application/stream+json

This commit is contained in:
Evan Prodromou 2011-06-23 11:38:46 -04:00
parent fadc4df039
commit 20396ce8e1
10 changed files with 10 additions and 10 deletions

View File

@ -170,7 +170,7 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link,'alternate', 'text/html');

View File

@ -266,7 +266,7 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link,'alternate', 'text/html');

View File

@ -135,7 +135,7 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($atom->title);
$doc->addLink($link, 'alternate', 'text/html');

View File

@ -169,7 +169,7 @@ class ApiTimelineHomeAction extends ApiBareAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link, 'alternate', 'text/html');

View File

@ -170,7 +170,7 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link, 'alternate', 'text/html');

View File

@ -235,7 +235,7 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link, 'alternate', 'text/html');

View File

@ -138,7 +138,7 @@ class ApiTimelineRetweetedToMeAction extends ApiAuthAction
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link, 'alternate', 'text/html');

View File

@ -137,7 +137,7 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
$this->raw($atom->getString());
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link, 'alternate', 'text/html');

View File

@ -153,7 +153,7 @@ class ApiTimelineTagAction extends ApiPrivateAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($title);
$doc->addLink($link, 'alternate', 'text/html');

View File

@ -202,7 +202,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
$this->showJsonTimeline($this->notices);
break;
case 'as':
header('Content-Type: application/json; charset=utf-8');
header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE);
$doc = new ActivityStreamJSONDocument($this->auth_user);
$doc->setTitle($atom->title);
$doc->addLink($link, 'alternate', 'text/html');