3 namespace Friendica\Module;
\r
5 use Friendica\BaseModule;
\r
6 use Friendica\Protocol\OStatus;
\r
9 * Provides public Atom feeds
\r
11 * Currently supported:
\r
12 * - /feed/[nickname]/ => posts
\r
13 * - /feed/[nickname]/posts => posts
\r
14 * - /feed/[nickname]/comments => comments
\r
15 * - /feed/[nickname]/replies => comments
\r
16 * - /feed/[nickname]/activity => activity
\r
18 * The nocache GET parameter is provided mainly for debug purposes, requires auth
\r
20 * @brief Provides public Atom feeds
\r
22 * @author Hypolite Petovan <mrpetovan@gmail.com>
\r
24 class Feed extends BaseModule
\r
26 public static function content()
\r
28 $a = self::getApp();
\r
30 $last_update = x($_GET, 'last_update') ? $_GET['last_update'] : '';
\r
31 $nocache = x($_GET, 'nocache') && local_user();
\r
34 http_status_exit(400);
\r
39 $type = $a->argv[2];
\r
54 $nickname = $a->argv[1];
\r
55 header("Content-type: application/atom+xml");
\r
56 echo OStatus::feed($nickname, $last_update, 10, $type, $nocache);
\r