WikidataComplete / Wikidata-Complete-Gadget

4 stars 5 forks source link

fix publish fact operation in Gadget #54

Closed lalit97 closed 2 years ago

lalit97 commented 2 years ago

the claim is not getting created because of empty numeric-id in payload

uri: https://www.wikidata.org/w/api.php

Payload:

action: wbcreateclaim
format: json
entity: Q16161947
property: P136
snaktype: value
value: {"entity-type":"item","numeric-id":""}
summary: Edited with Wikidatacomplete
token: sampletoken+\

Response:

{
    "error": {
        "code": "invalid-snak",
        "info": "Invalid snak data.",
        "messages": [
            {
                "name": "wikibase-api-invalid-snak",
                "parameters": [],
                "html": {
                    "*": "Invalid snak data."
                }
            }
        ],
        "*": "See https://www.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
    },
    "servedby": "mw1421"
}
lalit97 commented 2 years ago

fixed with #55