3 namespace Friendica\Module;
5 use Friendica\BaseModule;
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 * @author Hypolite Petovan <hypolite@mrpetovan.com>
23 class Feed extends BaseModule
25 public static function content(array $parameters = [])
29 $last_update = $_GET['last_update'] ?? '';
30 $nocache = !empty($_GET['nocache']) && local_user();
32 // @TODO: Replace with parameter from router
34 throw new \Friendica\Network\HTTPException\BadRequestException();
38 // @TODO: Replace with parameter from router
47 // Correct type names, no change needed
56 // @TODO: Replace with parameter from router
57 $nickname = $a->argv[1];
58 header("Content-type: application/atom+xml; charset=utf-8");
59 echo OStatus::feed($nickname, $last_update, 10, $type, $nocache, true);