2019-05-04 15:37:32 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Friendica\Module;
|
|
|
|
|
|
|
|
use Friendica\BaseModule;
|
2019-12-15 16:34:11 -05:00
|
|
|
use Friendica\DI;
|
2019-05-05 12:15:39 -04:00
|
|
|
use Friendica\Util\XML;
|
2019-05-04 15:37:32 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Prints the rsd.xml
|
|
|
|
* @see http://danielberlinger.github.io/rsd/
|
|
|
|
*/
|
|
|
|
class ReallySimpleDiscovery extends BaseModule
|
|
|
|
{
|
2019-11-05 16:48:54 -05:00
|
|
|
public static function rawContent(array $parameters = [])
|
2019-05-04 15:37:32 -04:00
|
|
|
{
|
2019-05-05 12:15:39 -04:00
|
|
|
header('Content-Type: text/xml');
|
|
|
|
|
2019-12-15 16:34:11 -05:00
|
|
|
$app = DI::app();
|
2019-05-05 12:15:39 -04:00
|
|
|
$xml = null;
|
|
|
|
echo XML::fromArray([
|
|
|
|
'rsd' => [
|
|
|
|
'@attributes' => [
|
|
|
|
'version' => '1.0',
|
|
|
|
'xmlns' => 'http://archipelago.phrasewise.com/rsd',
|
|
|
|
],
|
|
|
|
'service' => [
|
|
|
|
'engineName' => 'Friendica',
|
|
|
|
'engineLink' => 'http://friendica.com',
|
|
|
|
'apis' => [
|
|
|
|
'api' => [
|
|
|
|
'@attributes' => [
|
|
|
|
'name' => 'Twitter',
|
|
|
|
'preferred' => 'true',
|
|
|
|
'apiLink' => $app->getBaseURL(),
|
|
|
|
'blogID' => '',
|
|
|
|
],
|
|
|
|
'settings' => [
|
|
|
|
'docs' => [
|
|
|
|
'http://status.net/wiki/TwitterCompatibleAPI',
|
|
|
|
],
|
|
|
|
'setting' => [
|
|
|
|
'@attributes' => [
|
|
|
|
'name' => 'OAuth',
|
|
|
|
],
|
|
|
|
'false',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
]
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
], $xml);
|
2019-05-04 15:37:32 -04:00
|
|
|
exit();
|
|
|
|
}
|
|
|
|
}
|