Click or drag to resize

CargoWikiSiteExtensionsExecuteCargoQueryAsync(WikiSite, CargoQueryParameters, CancellationToken) Method

This is preliminary documentation and is subject to change.

Executes a Cargo query and retrieves the response rows.

Namespace: WikiClientLibrary.Cargo
Assembly: WikiClientLibrary.Cargo (in WikiClientLibrary.Cargo.dll) Version: 0.9.0-int.2+447d1d590e6726b7881f750a0a0e42908f3e417e
Syntax
public static Task<IList<JsonObject>> ExecuteCargoQueryAsync(
	this WikiSite site,
	CargoQueryParameters queryParameters,
	CancellationToken cancellationToken
)

Parameters

site  WikiSite
a MediaWiki site with Cargo extension installed.
queryParameters  CargoQueryParameters
query parameters.
cancellationToken  CancellationToken
a token used to cancel the operation.

Return Value

TaskIListJsonObject
a list of rows, each item is a JSON object with field name as key.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type WikiSite. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionsite or queryParameters is null.
ArgumentOutOfRangeExceptionqueryParameters.Limit is 0 or negative. - or - queryParameters.Offset is negative.
MediaWikiRemoteException When query execution failed, Cargo usually fails with internal_api_error_MWException error. You should observe "MWException" as the value of ErrorClass.
See Also