summaryrefslogtreecommitdiff
path: root/actions/apitimelineuser.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-02-11 13:54:40 -0800
committerZach Copley <zach@status.net>2010-02-11 13:56:05 -0800
commitc465f675d9dbcf9f808bc31a1d01e753df4ddf58 (patch)
treecccfd152bf1d52f27cd63d00c0337c1273991a11 /actions/apitimelineuser.php
parentc8d5c8442fe6ce54f7f65d1d0eb4203b06c09583 (diff)
Make Atom timelines in the API use Atom10feed
Diffstat (limited to 'actions/apitimelineuser.php')
-rw-r--r--actions/apitimelineuser.php25
1 files changed, 10 insertions, 15 deletions
diff --git a/actions/apitimelineuser.php b/actions/apitimelineuser.php
index cb8213619..d20bb0d20 100644
--- a/actions/apitimelineuser.php
+++ b/actions/apitimelineuser.php
@@ -150,6 +150,12 @@ class ApiTimelineUserAction extends ApiBareAuthAction
$atom = new AtomNoticeFeed();
+ $atom->setId($id);
+ $atom->setTitle($title);
+ $atom->setSubtitle($subtitle);
+ $atom->setLogo($logo);
+ $atom->setUpdated('now');
+
$atom->addLink(
common_local_url(
'showstream',
@@ -157,25 +163,14 @@ class ApiTimelineUserAction extends ApiBareAuthAction
)
);
- $atom->setId($id);
- $atom->setTitle($title);
- $atom->setSubtitle($subtitle);
- $atom->setLogo($logo);
- $atom->setUpdated('now');
-
$id = $this->arg('id');
-
- if ($id) {
- $selfuri = common_root_url() .
- 'api/statuses/user_timeline/' .
- rawurlencode($id) . '.atom';
- } else {
- $selfuri = common_root_url() .
- 'api/statuses/user_timeline.atom';
+ $aargs = array('format' => 'atom');
+ if (!empty($id)) {
+ $aargs['id'] = $id;
}
$atom->addLink(
- $selfuri,
+ $this->getSelfUri('ApiTimelineUser', $aargs),
array('rel' => 'self', 'type' => 'application/atom+xml')
);