api-call ( params -- assoc )
MediaWiki API

Prev:call-continue ( params quot1: ( params -- obj assoc ) quot2: ( ... -- ... ) -- seq )
Next:query ( params -- seq )


Vocabulary
mediawiki.api

Inputs
paramsan assoc of API parameters


Outputs
assoca parsed JSON result


Word description
Makes a call to a MediaWiki API. Retries on certain errorconditions. Uses a maxlag value of 5 and, in the case ofreplication lag, pauses for the amount of time specified by theAPI. Pauses 10 minutes on non-200 status codes and 5 minuteswhen the database is set to readonly. Prints debug informationon non-200 status codes and JSON parse failure. Prints APIwarnings and errors.

Examples
USING: locals mediawiki.api ; { { "meta" "tokens" } { "type" "watch" } } query "watchtoken" of [| token | { { "action" "watch" } { "titles" { "Volkswagen Beetle" "Factor (programming language)" } } { "token" token } } api-call ] call drop


Definition