function blogapi_rsd in Blog API 7
Same name and namespace in other branches
- 7.2 blogapi.module \blogapi_rsd()
1 string reference to 'blogapi_rsd'
- blogapi_menu in ./
blogapi.module - Implement hook_menu().
File
- ./
blogapi.module, line 903 - Enable users to post using applications that support XML-RPC blog APIs.
Code
function blogapi_rsd() {
global $base_url;
$xmlrpc = $base_url . '/xmlrpc.php';
$base = url('', array(
'absolute' => TRUE,
));
$blogid = 1;
# until we figure out how to handle multiple bloggers
drupal_add_http_header('Content-Type', 'application/rsd+xml; charset=utf-8');
print <<<__RSD__
<?xml version="1.0"?>
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
<service>
<engineName>Drupal</engineName>
<engineLink>http://drupal.org/</engineLink>
<homePageLink>{<span class="php-variable">$base</span>}</homePageLink>
<apis>
<api name="MetaWeblog" preferred="false" apiLink="{<span class="php-variable">$xmlrpc</span>}" blogID="{<span class="php-variable">$blogid</span>}" />
<api name="Blogger" preferred="false" apiLink="{<span class="php-variable">$xmlrpc</span>}" blogID="{<span class="php-variable">$blogid</span>}" />
<api name="MovableType" preferred="true" apiLink="{<span class="php-variable">$xmlrpc</span>}" blogID="{<span class="php-variable">$blogid</span>}" />
</apis>
</service>
</rsd>
__RSD__;
}