you need to use wbeditentity or some restbase equivalent.
Am Do., 12. Sept. 2024 um 19:13 Uhr schrieb tohuuu th@tohuuu.de:
Amir,
thank you for your feedback! But after checking the Wikidata API, I don't know how to get around the API limitations. PWB seems to simply call two API commands: wbremoveclaims ( https://www.wikidata.org/w/api.php?action=help&modules=wbremoveclaims ) and wbsetclaim ( https://www.wikidata.org/w/api.php?action=help&modules=wbsetclaim ) - so it seems that the API itself doesn't allow setting more than one claim with one command. But I've seen other bots doing multiple property changes within one edit (so I think one API call), for example https://commons.wikimedia.org/w/index.php?title=File%3AGasteinertal_vom_Zitt... so there must be a different way besides MediaInfo.addClaim().
Greetings, Florian
Am 09.09.24 um 15:24 schrieb Amir Sarabadani:
Hi, From reading the source code, I can't find anything that would allow it but adding a patch to make it happen shouldn't be hard. On top of that, you can introduce it in your script directly and hit the API from there. I know it's not great but it would work.
HTH
Am So., 8. Sept. 2024 um 13:34 Uhr schrieb tohuuu th@tohuuu.de:
Hi all,
i'm working on a bot whose task is to add some SDC claims to the mediainfo of Commons file pages. While there's a method removeClaims() (see
https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.html#pywikibot....)
to remove multiple claims in one step, its counterpart addClaim() (see
https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.html#pywikibot....)
doesn't accept a list of claims to add. This results in separate API calls (?) for each single claim top add. Is there a factual reason for that difference? Is there a different way to add multiple SDC claims in one edit step?
Thanks in advance!
Florian
pywikibot mailing list -- pywikibot@lists.wikimedia.org Public archives at https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/me... To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org
-- Amir (he/him)
pywikibot mailing list -- pywikibot@lists.wikimedia.org Public archives at https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/me... To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org
pywikibot mailing list -- pywikibot@lists.wikimedia.org Public archives at https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/me... To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org