XRDS

From WebOS

Jump to: navigation, search

XRDS (part of YADIS [1]) perhaps could be used to do detection of REST API endpoints (that's what the format is for).

Contents

[edit] Example for File System/List/TEP#Stephen_Paul_Weber

<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">
  <XRD>
    <Service priority="50">
      <Type>http://webos.singpolyma.net/File_System/List/TEP#Stephen_Paul_Weber</Type>
      <URI>http://example.com/list</URI>
    </Service>
  </XRD>
</xrds:XRDS>

[edit] Example for File System/List/TEP#Extensions

[edit] URL-based idea

<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">
  <XRD>
   <!-- the Type URL is not valid, it would have to be defined somewhere static that does not have a # in the base URL, obviously -->
    <Service priority="50">
      <Type>http://webos.singpolyma.net/File_System/List/TEP#Extensions#JSON</Type>
      <URI>http://example.com/json/list</URI>
    </Service>
  </XRD>
</xrds:XRDS>

[edit] namespace-based idea

<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)" xmlns:webos="http://webos.singpolyma.net/File_System/List/TEP#Extensions">
  <XRD>
    <Service priority="50">
      <Type>http://webos.singpolyma.net/File_System/List/TEP#Stephen_Paul_Weber</Type>
      <URI>http://example.com/json/list</URI>
      <webos:returnType>JSON</webos:returnType>
    </Service>
  </XRD>
</xrds:XRDS>
Personal tools