On 01.09.2015 16:57, Thiemo Mättig wrote:
Hi,

 > I now identified another format for API warnings [...] from action
"watch"

I'm not absolutely sure, but I think this is not really an other format.
The "warnings" field contains a list of modules. For each module you can
either have a list of "messages", or a plain string. In the later case
the string is stored with the "*" key you see in both examples.

The relevant code that creates these "warnings" structures for Wikibase
can be found in the ApiErrorReporter class.

The { "name": ..., "parameters": ..., "html": { "*": ... } } thing you
see is a rendering of a Message object. The "html" key can be seen in
\ApiErrorFormatter::addWarningOrError, the "*" is a result from the
Message class.

Hope that helps.

Yes, this is very helpful. Thanks. I had looked at this PHP code, but I could not see these things there (strings like "*" are not very distinctive, so I was not sure which "*" I am looking at ;-).

Markus


_______________________________________________
Wikidata-tech mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech

Reply via email to