index.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. declare(strict_types=1);
  3. header("Content-Security-Policy: default-src 'self'; frame-ancestors 'none'");
  4. header('X-Content-Type-Options: nosniff');
  5. ?>
  6. <!DOCTYPE html>
  7. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB">
  8. <head>
  9. <meta charset="UTF-8" />
  10. <title>FreshRSS API endpoints</title>
  11. <meta name="robots" content="noindex" />
  12. <link rel="start" href="../i/" />
  13. <script src="../scripts/api.js" defer="defer"></script>
  14. <script id="jsonVars" type="application/json">
  15. <?php
  16. require(__DIR__ . '/../../constants.php');
  17. require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
  18. FreshRSS_Context::initSystem();
  19. echo json_encode([
  20. 'greader' => Minz_Url::display('/api/greader.php', 'php', true),
  21. 'fever' => Minz_Url::display('/api/fever.php', 'php', true),
  22. ]);
  23. ?>
  24. </script>
  25. </head>
  26. <body>
  27. <h1>FreshRSS API endpoints</h1>
  28. <h2>Google Reader compatible API</h2>
  29. <dl>
  30. <dt>Your API address:</dt>
  31. <dd><?= Minz_Url::display('/api/greader.php', 'html', true) ?></dd>
  32. <dt>Google Reader API configuration test:</dt>
  33. <dd id="greaderOutput">?</dd>
  34. </dl>
  35. <h2>Fever compatible API</h2>
  36. <dl>
  37. <dt>Your API address:</dt>
  38. <dd><?= Minz_Url::display('/api/fever.php', 'html', true) ?></dd>
  39. <dt>Fever API configuration test:</dt>
  40. <dd id="feverOutput">?</dd>
  41. </dl>
  42. <h2>API for extensions</h2>
  43. <dl>
  44. <dt>Your API address:</dt>
  45. <dd><?= Minz_Url::display('/api/misc.php/Extension%20name/', 'html', true) ?></dd>
  46. </dl>
  47. </body>
  48. </html>