[Ocs] problem adding a content with a download

Frank Karlitschek karlitschek at kde.org
Sun Sep 12 16:19:47 PDT 2010


Hi Mateu,

sorry for the delay. I will look into this tomorrow.

Cheers
Frank


On 10.09.2010, at 18:34, Mateu Batle wrote:

> ping !
> 
> On 09/01/2010 10:33 AM, Mateu Batle wrote:
>> Cool, thanks Frank !
>> 
>> I've tested it and it seems to work better, still there are some issues:
>> 
>> 1) The content list does not list the downloadpackagename and
>> downloadpackerepo in the list.
>> At least not for the new type 2. Check here for example:
>> 
>> https://test.opendesktop.org/v1/content/data?categories=1801
>> 
>> 2) How we can know if it is type 0, 1 or 2 ? There is no field in the
>> response specifying that AFAIK.
>> Check here for an example:
>> 
>> https://test.opendesktop.org/v1/content/data/129629
>> 
>> 3) We should update the OCS spec draft with the download type 2 information.
>> 
>> cheers
>>  Mat
>> 
>> 
>> 
>> On 09/01/2010 07:35 AM, Frank Karlitschek wrote:
>>> Hi Mat,
>>> 
>>> I fixed several bugs for downloadtype=2
>>> Could you please test if the bug still exists?
>>> 
>>> Thanks :-)
>>> 
>>> 
>>> Cheers
>>> Frank
>>> 
>>> 
>>> On 30.08.2010, at 19:54, Mateu Batle wrote:
>>> 
>>> 
>>>> Hi Frank,
>>>> 
>>>> 
>>>> On 08/27/2010 08:12 AM, Frank Karlitschek wrote:
>>>> 
>>>>> Hi Mat,
>>>>> 
>>>>> the error output is now gone. Sorry for that.
>>>>> 
>>>>> 
>>>> great, thanks !
>>>> 
>>>> 
>>>>> I´m still not sure why you can´t add an entry via the OCS API. We do from KDE "Get Hot New Stuff" and attica without problems.
>>>>> 
>>>>> It also works for me from the command-line.
>>>>> You can test it like this:
>>>>> 
>>>>> curl http://<yourapikey>@api.test.opendesktop.org/v1/content/add -d name=testy -d type=1801  -d downloadtyp1=1  -d downloadname1=cooldownload  -d downloadlink1=google.com
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>> I think the problem is just with type=2, example:
>>>> 
>>>> curl http://<apikey>@api.test.opendesktop.org/v1/content/add -d
>>>> name=mateu2 -d type=1801  -d downloadtyp1=2  -d
>>>> downloadname1=cooldownload  -d downloadpackagename1=the-package -d
>>>> downloadrepository1=the-repo
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> By the way. Do you have upload support in the MeeGo Installer?
>>>>> 
>>>>> 
>>>> No, upload is not supported in MeeGo Garage.
>>>> 
>>>> 
>>>> cheers
>>>> Mat
>>>> 
>>>> 
>>>> 
>>>>> Cheers
>>>>> Frank
>>>>> 
>>>>> 
>>>>> On 26.08.2010, at 00:23, Mateu Batle wrote:
>>>>> 
>>>>> 
>>>>> 
>>>>>> Hi Frank,
>>>>>> 
>>>>>> sure, this is the test app I've created. Maybe the bug is in the client :)
>>>>>> thanks for your help !
>>>>>> 
>>>>>> cheers
>>>>>> Mat
>>>>>> 
>>>>>> 
>>>>>> On 08/25/2010 04:52 PM, Frank Karlitschek wrote:
>>>>>> 
>>>>>> 
>>>>>>> Hi Mat,
>>>>>>> 
>>>>>>> this is strange. I can´t reproduce the error.
>>>>>>> Do you have the actual url you are calling and the POST parameters?
>>>>>>> 
>>>>>>> This would help me a lot to debug this.
>>>>>>> 
>>>>>>> Thanks and sorry for the problem.
>>>>>>> 
>>>>>>> 
>>>>>>> Cheers
>>>>>>> Frank
>>>>>>> 
>>>>>>> On 25.08.2010, at 00:53, Mateu Batle wrote:
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>> Hi Frank,
>>>>>>>> 
>>>>>>>> can you give a quick look to the code below to check if I'm missing
>>>>>>>> something here.
>>>>>>>> I want to create a new content with a download of type package download.
>>>>>>>> The new content gets added but the download is never reported from the
>>>>>>>> server.
>>>>>>>> I have tried with downloadtype 0 and 2 (although I guess type 2 for
>>>>>>>> packages is not implemented yet)
>>>>>>>> 
>>>>>>>> Also I don't get the video links, are they implemented ?
>>>>>>>> 
>>>>>>>> cheers
>>>>>>>> Mat
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Attica::Content content;
>>>>>>>> content.addAttribute("downloadtyp1", "0");
>>>>>>>> content.addAttribute("downloadname1", "download name 1");
>>>>>>>> content.addAttribute("downloadlink1", "");
>>>>>>>> content.addAttribute("downloaddistributiontype1", "MeeGo");
>>>>>>>> content.addAttribute("downloadbuy1", "0");
>>>>>>>> content.addAttribute("downloadbuyreason1", "buy buy buy");
>>>>>>>> content.addAttribute("downloadbuyprice1", "100");
>>>>>>>> content.addAttribute("downloadgpgfingerprint1", "6AD9 150F D8CC 941B
>>>>>>>> 4541  2DCC 68B7 AB89 5754 8D2D");
>>>>>>>> content.addAttribute("downloadgpgsignature1",
>>>>>>>> "iEYEABECAAYFAkxT52oACgkQMNASEGDVgdegPAbDSMHn/xDQCfSplogMr9x0G0ZNqMUAn3WLVmXADVzWdEToTJ8B5wpdm3zb=A6Dy");
>>>>>>>> content.addAttribute("downloadpackagename1", "gdb-gdbserver");
>>>>>>>> content.addAttribute("downloadpackagerepository1", "");
>>>>>>>> content.addAttribute("description", "a description");
>>>>>>>> content.setName("awesome app 2");
>>>>>>>> content.addAttribute("version", "1.0");
>>>>>>>> content.addAttribute("summary", "a summary");
>>>>>>>> content.addAttribute("licensetype", "2");
>>>>>>>> content.addAttribute("license", "");
>>>>>>>> content.addAttribute("feedbackurl", "http://www.meego.com/");
>>>>>>>> content.addAttribute("video1",
>>>>>>>> "http://mirror.bigbuckbunny.de/peach/bigbuckbunny_movies/big_buck_bunny_480p_stereo.ogg");
>>>>>>>> content.addAttribute("changelog", "a changelog");
>>>>>>>> Attica::ItemPostJob<Attica::Content> * addContentJob =
>>>>>>>> provider.addNewContent(category, content);
>>>>>>>> 
>>>>>>>> _______________________________________________
>>>>>>>> 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
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>> <constants.h><main.cpp><test.pro><testattica.cpp><testattica.h>
>>>>>> 
>>>>>> 
>>>>> --
>>>>> Frank Karlitschek
>>>>> karlitschek at kde.org
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> Ocs mailing list
>>>>> Ocs at lists.freedesktop.org
>>>>> http://lists.freedesktop.org/mailman/listinfo/ocs
>>>>> 
>>>>> 
>>>> _______________________________________________
>>>> 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






More information about the Ocs mailing list