2019-05-04 15:37:32 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Friendica\Module;
|
|
|
|
|
|
|
|
use Friendica\BaseModule;
|
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 14:16:26 -05:00
|
|
|
public static function rawContent($parameters)
|
2019-05-04 15:37:32 -04:00
|
|
|
{
|
2019-05-05 12:15:39 -04:00
|
|
|
header('Content-Type: text/xml');
|
|
|
|
|
|
|
|
$app = self::getApp();
|
|
|
|
$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();
|
|
|
|
}
|
|
|
|
}
|