Dear All,
Quite new to Piwigo (user since a year), and writing a small set of Python 3.5 scripts to automate my picture collection upload (+20K), I found that API function pwg.categories.delete does return positive answer even if the given category ID does not exist:
{'stat': 'ok', 'result': None}
This is not a big deal (except for error checking and tests), but I wonder if I am wrong somewhere (I am able to make calls to other API)?
Thanks a lot for this nice product!
Patrice E.
Piwigo version: 2.9.2
Offline
Hi esppat,
This behavior from Piwigo is perfectly normal (or at least "expected"). Imagine you pwg.categories.delete on several categories, what if only one of these categories does not exist? Would like to have an error code returned, while Piwigo has deleted the other relevant categories? Or imagine you have concurrentpwg.categories.delete calls on the same category id, you don't really care which call won the race, you just want your category to be deleted.
I hope you'll publish your scripts on Github (or somewhere else), so that we can have some examples in Python using Piwigo API :-) (we already have PHP, Java, Perl, ObjectiveC for iOS)
Offline
OK, thanks for the explanation. I do not agree, as testing this kind of behavior is not possible, but that's not a big deal, as I said in my previous message.
Concerning sharing Python scripts, for sure I will send you some excerpt of my code, if this can help.
Once again, thanks for this beautiful product, it's amazing!
Patrice E.
Offline