[Social-Desktop] Proposed extensions to the OCS API

Ben Cooksley sourtooth at gmail.com
Sat May 1 02:07:05 CEST 2010


Hi all,

the following is a proposed extension to the OCS API, it adds support
for categories to the knowledge base component.
It adds a "categories" call to the knowledge base component which will
return a list of all categories supported. It is paged with 100 items
per page as the default as the listings are expected to be relatively
small, and does not accept any arguments except for pagination.

Example XML:
<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>1</totalitems>
  <itemsperpage>10</itemsperpage>
 </meta>
 <data>
  <category>
   <id>number</id>
   <name>Name of category</name>
   <description>category desc</description>
   <icon>web url to icon</icon>
   <parent>id of parent, 0 if top level</parent>
   <itemcount>Number of knowledge base items in this category</itemcount>
  </category>
 </data>
</ocs>

Notes:
id / parent - for internal use only
name / description / itemcount - for display to the user
icon - for rendering to the user, should not be displayed raw.

This also adds an argument "category" to the list method, which when
provided will filter out anything not in that category.

Thoughts?

Regards,
Ben


More information about the Social-Desktop mailing list