Mailinglist Archive: opensuse-buildservice (247 mails)

< Previous Next >
Re: [opensuse-buildservice] GSoC: Setitng up API calls for OBS Discussion system
On Fri, Jun 14, 2013 at 5:50 PM, Stephan Kulow <coolo@xxxxxxx> wrote:
On 13.06.2013 17:01, Shayon Mukherjee wrote:
Hello,

My mentor and myself have worked on how commenting will work inside
OBS[api] and accordingly [webui] talk to [api]. Below mentioned are
the calls I am plan on setting up. Examples are provided at most of
the areas.



GET /source/<project>/_comments?limit=10&offset=0

I don't see how comments have any relation to /source - care to explain
how you ended up in the source controller? IMO it should work just like
the tag controller

/comment/<project>[/<package>

Greetings, Stephan

--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx


Hello folks,

I have incorporated the feedbacks received and here is the update
version of the api call sheet. Let me know if something doesn't look
right.

API calls for comments


GET /comment/<project>?limit=10&offset=0

Arguments:

project - Project name

Parameter:
limit - Limit the number of retrieved comments
offset - offset received comments by offset

To obtain comments posted for a project

Example:
<comments type=”project” object=”home:name” size=”2” limit=”10” offset=”0”>
<comment user=”joe” title=”title” id=”0815”>
This is a comment
</comment>
<comment user=”sam” title=”title” id=”0816” parent=”0815”>
This is a reply
</comment>
</comments>

POST /comment/<project>

Arguments:

project - Project name

Creating new comment for a project

GET /comment/<project>/<package>?limit=10&offset=0

Arguments:

project - Project name
package - Package name

Parameter:
limit - Limit the number of retrieved comments
offset - offset received comments by offset

To obtain comments posted for a package in a project

Example:
<comments type=”package” object=”home:name::foo” size=”2” limit=”10” offset=”0”>
<comment user=”joe” title=”title” id=”0815”>
This is a comment
</comment>
<comment user=”sam” title=”title” id=”0816” parent=”0815”>
This is a reply
</comment>
</comments>

POST /comment/<project>/<package>

Creating new comment for a package

GET /comment/request/<id>?limit=10&offset=0

Arguments:

id - request id

Parameter:
limit - Limit the number of retrieved comments
offset - offset received comments by offset

To obtain comments posted for a request

Example:
<comments type=”request” object=”12345” size=”2” limit=”10” offset=”0”>
<comment user=”joe” title=”title” id=”0815”>
This is a comment
</comment>
<comment user=”sam” title=”title” id=”0816” parent=”0815”>
This is a reply
</comment>
</comments>

POST /comment/request/<id>

Creating new comment for a request



Thanks
Shayon
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >