Hi,
It looks like the wikibase API[1] does not provide a way to delete an item. To remove an item / propery on http://test.wikidata.org a script would have do web scrapping and use the same interface people attending the deletion requests do[2]. Unfortunately a regular user does not seem to have permission to do that on test.wikidata.org. Would it be possible to upgrade the user permissions to allow deletion of items / property on test.wikidata.org ?
Cheers
[1] https://www.mediawiki.org/wiki/Wikibase/API [2] https://www.wikidata.org/wiki/Wikidata:Requests_for_deletions
On 08/09/2016 17:54, Loic Dachary wrote:
Hi,
I'd like to write integration tests for https://www.wikidata.org/wiki/User:FLOSSbot and use test.wikidata.org for that. I figured out how to create properties[1] with pywikibot and search for them[2]. But I was not able to figure out how to remove them afterwards, to not clutter test.wikidata.org. The https://www.mediawiki.org/wiki/Wikibase/API page does not show anything obvious.
Any idea ?
Cheers
[1] import pywikibot site = pywikibot.Site("test", "wikidata") print(str(site.editEntity({'new': 'property'}, {'datatype':'item', "labels": {"en": {"language":"en","value":"FLOSS3property"} } })))
[2] import pywikibot site = pywikibot.Site("test", "wikidata") for e in site.search_entities('FLOSS', 'en', type='property'): print(str(e))