diff options
author | Evan Prodromou <evan@status.net> | 2010-10-24 15:58:53 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-10-24 15:58:53 -0400 |
commit | 43a67b150a4e4285224ccf695171df731c736a1e (patch) | |
tree | 0988e83d344c0a27570dc2c09db527817df670f9 /lib | |
parent | 69a1ecec9b4b7168fb570d2d07bcfaa0f29fc856 (diff) |
show a single notice in atom entry format
Diffstat (limited to 'lib')
-rw-r--r-- | lib/apiaction.php | 6 | ||||
-rw-r--r-- | lib/router.php | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/apiaction.php b/lib/apiaction.php index 4e9dbb310..8a7be3150 100644 --- a/lib/apiaction.php +++ b/lib/apiaction.php @@ -726,6 +726,12 @@ class ApiAction extends Action $this->endDocument('xml'); } + function showSingleAtomStatus($notice) + { + header('Content-Type: application/atom+xml; charset=utf-8'); + print $notice->asAtomEntry(true, true, true, $this->auth_user); + } + function show_single_json_status($notice) { $this->initDocument('json'); diff --git a/lib/router.php b/lib/router.php index 9aaac7dfe..834445f09 100644 --- a/lib/router.php +++ b/lib/router.php @@ -399,12 +399,12 @@ class Router $m->connect('api/statuses/show.:format', array('action' => 'ApiStatusesShow', - 'format' => '(xml|json)')); + 'format' => '(xml|json|atom)')); $m->connect('api/statuses/show/:id.:format', array('action' => 'ApiStatusesShow', 'id' => '[0-9]+', - 'format' => '(xml|json)')); + 'format' => '(xml|json|atom)')); $m->connect('api/statuses/update.:format', array('action' => 'ApiStatusesUpdate', |