Files
FreshRSS/p/api/index.php
Alexandre Alapetite 9c6682e7ed Avoid manual initialisations of system or user configuration (#3070)
* Avoid manual intialisations of system or user configuration

More consistent use of Context

* Simplify FreshRSS_Context::initUser

* Remove a few manual get_user_configuration

* A bit of debugging

* Fix context user init

* Fix install

* Fix concurrency

Concurrent requests could lead to bad race condition

* Fix actualize cron

Fix case when system i initialised several times
2021-01-02 21:20:19 +01:00

47 lines
1.1 KiB
PHP

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB">
<head>
<meta charset="UTF-8" />
<title>FreshRSS API endpoints</title>
<meta name="robots" content="noindex" />
<link rel="start" href="../i/" />
<script src="../scripts/api.js" defer="defer"></script>
<script id="jsonVars" type="application/json">
<?php
require(__DIR__ . '/../../constants.php');
require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
FreshRSS_Context::initSystem();
echo json_encode(array(
'greader' => Minz_Url::display('/api/greader.php', 'php', true),
'fever' => Minz_Url::display('/api/fever.php', 'php', true),
));
?>
</script>
</head>
<body>
<h1>FreshRSS API endpoints</h1>
<h2>Google Reader compatible API</h2>
<dl>
<dt>Your API address:</dt>
<dd><?php
echo Minz_Url::display('/api/greader.php', 'html', true);
?></dd>
<dt>Google Reader API configuration test:</dt>
<dd id="greaderOutput">?</dd>
</dl>
<h2>Fever compatible API</h2>
<dl>
<dt>Your API address:</dt>
<dd><?php
echo Minz_Url::display('/api/fever.php', 'html', true);
?></dd>
<dt>Fever API configuration test:</dt>
<dd id="feverOutput">?</dd>
</dl>
</body>
</html>