3 namespace Friendica\Module;
5 use Friendica\BaseModule;
6 use Friendica\Protocol\OStatus;
9 * Provides public Atom feeds
11 * Currently supported:
12 * - /feed/[nickname]/ => posts
13 * - /feed/[nickname]/posts => posts
14 * - /feed/[nickname]/comments => comments
15 * - /feed/[nickname]/replies => comments
16 * - /feed/[nickname]/activity => activity
18 * The nocache GET parameter is provided mainly for debug purposes, requires auth
20 * @brief Provides public Atom feeds
22 * @author Hypolite Petovan <hypolite@mrpetovan.com>
24 class Feed extends BaseModule
26 public static function content(array $parameters = [])
30 $last_update = $_GET['last_update'] ?? '';
31 $nocache = !empty($_GET['nocache']) && local_user();
33 // @TODO: Replace with parameter from router
35 throw new \Friendica\Network\HTTPException\BadRequestException();
39 // @TODO: Replace with parameter from router
48 // Correct type names, no change needed
57 // @TODO: Replace with parameter from router
58 $nickname = $a->argv[1];
59 header("Content-type: application/atom+xml; charset=utf-8");
60 echo OStatus::feed($nickname, $last_update, 10, $type, $nocache, true);