Couldn't an alternative to be deprecate and get rid of wbsetclaim as you can do everything it can do and more through wbeditentity with little more knowledge of the serialization format..

i.e. in wbsetclaim I enter:
{"mainsnak":{"snaktype":"value","property":"P56","datavalue":{"value":"ExampleString","type":"string"}},"type":"statement","rank":"normal"}
in wbeditentity I have to enter:
{"claims":[{"mainsnak":{"snaktype":"value","property":"P56","datavalue":{"value":"ExampleString","type":"string"}},"type":"statement","rank":"normal"}]}
I am sure people could cope with that..?
This would also mean getting rid of 200 lines of codes and 299 lines of tests that in my eyes are not really needed.

Addshore


On 26 February 2014 22:26, Jeroen De Dauw <jeroendedauw@gmail.com> wrote:
Hey,

* we introduce a new optional parameter "id"
* if a guid is set inside the claim serialization, change that claim if it exists and return an error if that claim is unknown.
* if no guid is set in the claim serialization, create a new claim for the entity identified by the new parameter "id". if "id" is not set, return an error.

This is fine for me - barring naming nitpicks and whatnot.

Cheers

--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil. ~=[,,_,,]:3
--

_______________________________________________
Wikidata-tech mailing list
Wikidata-tech@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech