[Open-collaboration-services] Open Collaboration Services version 1.6 draft 1 - Forum component problem

Frank Karlitschek karlitschek at kde.org
Fri Aug 6 10:32:11 CEST 2010


Very cool.

I added you stuff unmodified to the specification:
http://www.freedesktop.org/wiki/Specifications/open-collaboration-services-draft

I will do a reference server implementation in PHP for this in the next few weeks.
You are also implementing it?

Thanks for your contribution. :-)


Cheers
Frank



On 05.08.2010, at 06:16, Ben Cooksley wrote:

> Hi Frank,
> 
> Please find the specification below.
> 
> Regards,
> Ben
> 
> Forum Module Specification:
> 
> 1) list
> 
> Gets a list of forums.
> Syntax: /v1/forum/list
> HTTP Method: GET
> URL Arguments: page - The list page. You can control the size of a
> page with the pagesize argument. The first page is 0, the second is 1,
> ...
> URL Arguments: pagesize - The amount of entries per page.
> Result: comments xml
> Statuscodes:
> 100 - successful
> 
> Example: http://frank:password@api.opendesktop.org/v1/forums/data&page=1&pagesize=10
> Gets the second page of the list of forums. The pagesize is 10
> 
> Example:
> <?xml version="1.0"?>
> <ocs>
> <meta>
>  <status>ok</status>
>  <statuscode>100</statuscode>
>  <message></message>
> </meta>
> <data>
>  <forum>
>   <id>234</id>
>   <name>vfvvdsx</name>
>   <childcount>0</childcount>
>   <date>2005-01-29T18:58:40+01:00</date>
>  </forum>
>  <forum>
>   <id>235</id>
>   <name>vxvdfvd</name>
>   <childcount>1</childcount>
>   <date>2005-01-29T19:17:06+01:00</date>
>   <children>
>    <forum>
>     <id>315</id>
>     <name>testy</name>
>     <childcount>0</childcount>
>     <date>2007-03-13T21:34:43+01:00</date>
>    </forum>
>   </children>
>  </forum>
> </data>
> </ocs>
> 
> 2) topics/list
> 
> Gets a list of a specific set of topics.
> 
> Syntax: /v1/forum/topics/list
> HTTP Method: GET
> URL Arguments: forum - Id of the forum you are requesting a list of.
> Not required if a search term is provided.
> URL Arguments: search - a keyword you want find in the name,
> description or comment of a topic. Not required if a forum id is
> provided.
> URL Arguments: sortmode - The sortmode of the list. Possible values
> are: "new" - newest first or "alpha" - alphabetical
> URL Arguments: page - The list page. You can control the size of a
> page with the pagesize argument. The first page is 0, the second is 1,
> ...
> URL Arguments: pagesize - The amount of entries per page.
> 
> Result: forum topic listing xml
> Statuscodes:
> 100 - successful
> 
> Example: http://frank:password@api.opendesktop.org/v1/forum/topics/list?forum[]=123&search=foo&sortmode=new&page=1
> Gets the second page of the list of the newest topics from forum 123
> with the string foo in the subject, content or the comment. Additional
> forums can be specified to be searched by adding further &forum[]=
> entries to the request.
> 
> Example:
> <?xml version="1.0"?>
> <ocs>
> <meta>
>  <status>ok</status>
>  <statuscode>100</statuscode>
>  <message></message>
>  <totalitems>2</totalitems>
>  <itemsperpage>10</itemsperpage>
> </meta>
> <data>
>  <topic details="detail">
>   <id>1</id>
>   <forumid>123</forumid>
>   <user>testy</user>
>   <changed>2009-02-07T23:14:11+01:00</changed>
>   <subject>Random forum post</subject>
>   <content>Just testing</content>
>   <comments>0</comments>
>  </topic>
> </data>
> 
> 3) forum/topics/add
> 
> Add a new topic to a forum. Only authenticated users are allowed to
> access this method. Authentication is done by sending a Basic HTTP
> Authorisation header. All arguments are mandatory.
> 
> Syntax: /v1/forum/topic/add
> HTTP Method: POST
> POST Argument: subject - Subject of the new topic
> POST Argument: content - Content of the first post of the new topic
> POST Argument: forum - id of the forum entry to be added to if available
> Result: ocs xml
> Statuscodes:
> 100 - successful
> 101 - please specify all mandatory fields
> 
> Example: http://frank:password@api.opendesktop.org/v1/forum/topic/add
> 
> Example:
> <?xml version="1.0"?>
> <ocs>
> <meta>
> <status>ok</status>
> <statuscode>100</statuscode>
> <message></message>
> </meta>
> </ocs>


--
Frank Karlitschek
karlitschek at kde.org






More information about the Open-collaboration-services mailing list