[opensuse-buildservice] GSoC: Setitng up API calls for OBS Discussion system
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 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 project=”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 /source/<project>/_comments Arguments: project - Project name Creating new comment for a project GET /source/<project>/<package>/_comments?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 project=”home:name” package=”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 /source/<project>/<package>/_comments Creating new comment for a package GET /request/<id>/_comments?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 request=”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 /request/<id>/_comments Creating new comment for a request If you have something to add or if you feel something isnt the way it is suppose to be. Please let me know your thoughts and comments, and/or if you have any alternative(s) to the same. Thanks Shayon -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Am Donnerstag, 13. Juni 2013, 20:31:29 schrieb Shayon Mukherjee:
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.
In short, I like it :)
GET /source/<project>/_comments?limit=10&offset=0
Arguments:
project - Project name
Parameter:
limit - Limit the number of retrieved comments
maybe we should have a default here to avoid that simple implementations download too much.
offset - offset received comments by offset
To obtain comments posted for a project
Example:
<comments project=”home:name” size=”2” limit=”10” offset=”0”>
hm, if we can avoid project attribute, we can stay more compatible. Means old clients would maybe able to handle comments on objects. What about type="project" object="home:name" or type="package" object="home:name::package" or type="request" object="42" so the xml schema does not change when a comment is attached to some new object? As an alternative way, we could stay with the project attribute, but in that case we could simplify the comment modifcation to POST /request/_comments However, I have no strong opinion here, take it as a loud thinking and feel free to ignore it ;) bye adrian -- Adrian Schroeter email: adrian@suse.de SUSE LINUX GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Thu, Jun 13, 2013 at 8:43 PM, Adrian Schröter
Am Donnerstag, 13. Juni 2013, 20:31:29 schrieb Shayon Mukherjee:
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.
In short, I like it :)
:)
GET /source/<project>/_comments?limit=10&offset=0
Arguments:
project - Project name
Parameter:
limit - Limit the number of retrieved comments
maybe we should have a default here to avoid that simple implementations download too much.
offset - offset received comments by offset
To obtain comments posted for a project
Example:
<comments project=”home:name” size=”2” limit=”10” offset=”0”>
hm, if we can avoid project attribute, we can stay more compatible. Means old clients would maybe able to handle comments on objects.
What about
type="project" object="home:name"
or
type="package" object="home:name::package"
or
type="request" object="42"
so the xml schema does not change when a comment is attached to some new object?
As an alternative way, we could stay with the project attribute, but in that case we could simplify the comment modifcation to
POST /request/_comments
That sounds like a great idea. Although, my familiarity with OBS and its architecture is still developing. That being said, I wonder if allowing old clients handle comments, may break something along the way. That being said, restricting comments to types - projects, packages and requests, is a limited and I think is a good start. Evenutally we can expand or open it allowing further collaboration. Just a thought. Will probabaly discuss further with my mentor. Anybody else, feel free to pitch in ;).
However, I have no strong opinion here, take it as a loud thinking and feel free to ignore it ;)
Thanks. Really appreciate your input here :).
bye adrian
--
Adrian Schroeter email: adrian@suse.de
SUSE LINUX GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany
Cheers! Shayon -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
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@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Fri, Jun 14, 2013 at 5:50 PM, Stephan Kulow
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>
Yep, you are right. I missed the fact that we will be routing through the source controller and that write all the methods and generate XML accordingly. I will change the api calls to route it through the comments controller now :)
Greetings, Stephan
Thanks Shayon -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Fri, Jun 14, 2013 at 5:50 PM, Stephan Kulow
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@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
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@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (3)
-
Adrian Schröter
-
Shayon Mukherjee
-
Stephan Kulow