3 namespace Friendica\Module;
5 use Friendica\BaseModule;
6 use Friendica\Core\System;
7 use Friendica\Protocol\OStatus;
10 * Provides public Atom feeds
12 * Currently supported:
13 * - /feed/[nickname]/ => posts
14 * - /feed/[nickname]/posts => posts
15 * - /feed/[nickname]/comments => comments
16 * - /feed/[nickname]/replies => comments
17 * - /feed/[nickname]/activity => activity
19 * The nocache GET parameter is provided mainly for debug purposes, requires auth
21 * @brief Provides public Atom feeds
23 * @author Hypolite Petovan <hypolite@mrpetovan.com>
25 class Feed extends BaseModule
27 public static function content()
31 $last_update = defaults($_GET, 'last_update', '');
32 $nocache = !empty($_GET['nocache']) && local_user();
34 // @TODO: Replace with parameter from router
36 System::httpExit(400);
40 // @TODO: Replace with parameter from router
49 // Correct type names, no change needed
58 // @TODO: Replace with parameter from router
59 $nickname = $a->argv[1];
60 header("Content-type: application/atom+xml; charset=utf-8");
61 echo OStatus::feed($nickname, $last_update, 10, $type, $nocache, true);