[Ocs] add comment should return id

Mateu Batle mateu.batle at collabora.co.uk
Mon Sep 13 06:31:35 PDT 2010


 Hi Frank,

in this case I agree, I didn't know it was already done that way in
other calls.
Forget it, better to keep consistency :)

cheers
  Mateu



On 09/12/2010 06:03 PM, Frank Karlitschek wrote:
> Hi Mateu,
>
>
> I think it is debatable if the id should be part of the metadata or the data tag. 
> We have it in the data tag in all the other OCS calls so I think we should do it like this to stay consistent.
> We could change this in 2.0 of course. :-)
>
>
> Cheers
> Frank
>
>
> On 10.09.2010, at 18:48, Mateu Batle wrote:
>
>> Hi Frank
>>
>> I was trying this and the id is returned, but I think it would be better
>> if it is part of the metadata.
>> Since I think this will be common in many add requests, and all add
>> operations just add one item.
>>
>> So instead of this:
>>
>> <?xml version="1.0"?>
>> <ocs>
>> <meta>
>>  <status>ok</status>
>>  <statuscode>100</statuscode>
>>  <message></message>
>> </meta>
>> <data>
>>  <comment>
>>   <id>381686</id>
>>  </comment>
>> </data>
>> </ocs>
>>
>> Return this:
>>
>> <?xml version="1.0"?>
>> <ocs>
>> <meta>
>>  <status>ok</status>
>>  <statuscode>100</statuscode>
>>  <message></message>
>>   <id>381686</id>
>>  </meta>
>> </ocs>
>>
>> What do you think ?
>>
>> best regards
>>  Mateu
>>
>>
>> On 08/25/2010 09:55 AM, Frank Karlitschek wrote:
>>> Hi,
>>>
>>> I add the id as you suggested. Will be live with the next server update tomorrow.
>>>
>>> Cheers
>>> Frank
>>>
>>>
>>>
>>>
>>> On 24.08.2010, at 01:52, Mateu Batle wrote:
>>>
>>>> Hi all,
>>>>
>>>> let's give some life to this new freedesktop list, thanks Frank for
>>>> getting it :)
>>>>
>>>> The request for the new spec is when a new comment is added,
>>>> I think the response back to the client must include the new id created
>>>> for the comment.
>>>> I need this to immediately rate the comment just after creating it.
>>>>
>>>> I have thought of a workaround but it is neither elegant, nor efficient
>>>> nor safe, so please let's get this.
>>>> The workaround would be get all the comments again, and check date /
>>>> title / text / user.
>>>> I think it is small requirement for the server, but a big win for the
>>>> client.
>>>>
>>>> Actually I think this should be for all add / create / new operations,
>>>> not just for comments.
>>>>
>>>> cheers
>>>> Mateu
>>>> _______________________________________________
>>>> Ocs mailing list
>>>> Ocs at lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/ocs
>>> --
>>> Frank Karlitschek
>>> karlitschek at kde.org
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Ocs mailing list
>>> Ocs at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/ocs
>>
>> -- 
>> Mateu Batle
>> Software Engineer
>> Collabora Ltd.
>>
>> _______________________________________________
>> Ocs mailing list
>> Ocs at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/ocs
>
> --
> Frank Karlitschek
> karlitschek at kde.org
>
>
>
>


-- 
Mateu Batle
Software Engineer
Collabora Ltd.



More information about the Ocs mailing list