[Ocs] problem adding a content with a download
Frank Karlitschek
karlitschek at kde.org
Fri Aug 27 06:12:16 PDT 2010
Hi Mat,
the error output is now gone. Sorry for that.
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
By the way. Do you have upload support in the MeeGo Installer?
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
More information about the Ocs
mailing list