2021-11-08 22:35:41 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @copyright Copyright (C) 2010-2021, the Friendica project
|
|
|
|
*
|
|
|
|
* @license GNU AGPL version 3 or any later version
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2021-11-10 08:31:39 +01:00
|
|
|
namespace Friendica\Module\Api\GNUSocial\Help;
|
2021-11-08 22:35:41 +01:00
|
|
|
|
|
|
|
use Friendica\Module\BaseApi;
|
2021-11-12 20:03:27 +01:00
|
|
|
use Friendica\DI;
|
2021-11-08 22:35:41 +01:00
|
|
|
|
|
|
|
/**
|
2021-11-10 08:31:39 +01:00
|
|
|
* API endpoint: /api/help/test
|
2021-11-08 22:35:41 +01:00
|
|
|
*/
|
|
|
|
class Test extends BaseApi
|
|
|
|
{
|
2021-11-14 20:46:25 +01:00
|
|
|
public static function rawContent()
|
2021-11-08 22:35:41 +01:00
|
|
|
{
|
2021-11-14 20:46:25 +01:00
|
|
|
if (!empty(static::$parameters['extension']) && (static::$parameters['extension'] == 'xml')) {
|
2021-11-08 22:53:34 +01:00
|
|
|
$ok = 'true';
|
|
|
|
} else {
|
|
|
|
$ok = 'ok';
|
|
|
|
}
|
2021-11-08 22:54:55 +01:00
|
|
|
|
2021-11-14 20:46:25 +01:00
|
|
|
DI::apiResponse()->exit('ok', ['ok' => $ok], static::$parameters['extension'] ?? null);
|
2021-11-08 22:35:41 +01:00
|
|
|
}
|
|
|
|
}
|