index.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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><?= Minz_Url::display('/api/greader.php', 'html', true) ?></dd>
  30. <dt>Google Reader API configuration test:</dt>
  31. <dd id="greaderOutput">?</dd>
  32. </dl>
  33. <h2>Fever compatible API</h2>
  34. <dl>
  35. <dt>Your API address:</dt>
  36. <dd><?= Minz_Url::display('/api/fever.php', 'html', true) ?></dd>
  37. <dt>Fever API configuration test:</dt>
  38. <dd id="feverOutput">?</dd>
  39. </dl>
  40. <h2>API for extensions</h2>
  41. <dl>
  42. <dt>Your API address:</dt>
  43. <dd><?= Minz_Url::display('/api/misc.php/Extension%20name/', 'html', true) ?></dd>
  44. </dl>
  45. </body>
  46. </html>