index.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. declare(strict_types=1);
  3. ?>
  4. <!DOCTYPE html>
  5. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB">
  6. <head>
  7. <meta charset="UTF-8" />
  8. <title>FreshRSS API endpoints</title>
  9. <meta name="robots" content="noindex" />
  10. <link rel="start" href="../i/" />
  11. <script src="../scripts/api.js" defer="defer"></script>
  12. <script id="jsonVars" type="application/json">
  13. <?php
  14. require(__DIR__ . '/../../constants.php');
  15. require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
  16. FreshRSS_Context::initSystem();
  17. echo json_encode([
  18. 'greader' => Minz_Url::display('/api/greader.php', 'php', true),
  19. 'fever' => Minz_Url::display('/api/fever.php', 'php', true),
  20. ]);
  21. ?>
  22. </script>
  23. </head>
  24. <body>
  25. <h1>FreshRSS API endpoints</h1>
  26. <h2>Google Reader compatible API</h2>
  27. <dl>
  28. <dt>Your API address:</dt>
  29. <dd><?php
  30. echo Minz_Url::display('/api/greader.php', 'html', true);
  31. ?></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><?php
  39. echo Minz_Url::display('/api/fever.php', 'html', true);
  40. ?></dd>
  41. <dt>Fever API configuration test:</dt>
  42. <dd id="feverOutput">?</dd>
  43. </dl>
  44. </body>
  45. </html>