diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-03-10 16:15:57 -0700 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2009-03-10 16:15:57 -0700 |
commit | 91980c73a76bcbedd5f23a3232988a32aa8c7127 (patch) | |
tree | 94a49d0111d3484db7321032f879ac580b1d5065 /actions/twitapifavorites.php | |
parent | 945bbf00dc9ee106359e9387956c72c1290d12fc (diff) |
Updates to the API to improve Atom feeds
Diffstat (limited to 'actions/twitapifavorites.php')
-rw-r--r-- | actions/twitapifavorites.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/actions/twitapifavorites.php b/actions/twitapifavorites.php index 737b7229f..31dce341b 100644 --- a/actions/twitapifavorites.php +++ b/actions/twitapifavorites.php @@ -61,10 +61,9 @@ class TwitapifavoritesAction extends TwitterapiAction } $sitename = common_config('site', 'name'); - $siteserver = common_config('site', 'server'); - $title = sprintf(_('%s / Favorites from %s'), $sitename, $user->nickname); - $id = "tag:$siteserver:favorites:".$user->id; + $taguribase = common_config('integration', 'taguri'); + $id = "tag:$taguribase:Favorites:".$user->id; $link = common_local_url('favorites', array('nickname' => $user->nickname)); $subtitle = sprintf(_('%s updates favorited by %s / %s.'), $sitename, $profile->getBestName(), $user->nickname); @@ -76,7 +75,14 @@ class TwitapifavoritesAction extends TwitterapiAction $this->show_rss_timeline($notice, $title, $link, $subtitle); break; case 'atom': - $this->show_atom_timeline($notice, $title, $id, $link, $subtitle); + if (isset($apidata['api_arg'])) { + $selfuri = $selfuri = common_root_url() . + 'api/favorites/' . $apidata['api_arg'] . '.atom'; + } else { + $selfuri = $selfuri = common_root_url() . + 'api/favorites.atom'; + } + $this->show_atom_timeline($notice, $title, $id, $link, $subtitle, null, $selfuri); break; case 'json': $this->show_json_timeline($notice); |