Click or drag to resize

WikiSiteSearchApiEndpointAsync Method

This is preliminary documentation and is subject to change.

Given a site or page URL of a MediaWiki site, try to look for the Api Endpoint URL of it.

Namespace: WikiClientLibrary.Sites
Assembly: WikiClientLibrary (in WikiClientLibrary.dll) Version: 0.9.0-int.2+447d1d590e6726b7881f750a0a0e42908f3e417e
Syntax
public static Task<string?> SearchApiEndpointAsync(
	WikiClient client,
	string urlExpression,
	CancellationToken cancellationToken = default
)

Parameters

client  WikiClient
WikiClient instance.
urlExpression  String
URL of MediaWiki site, or any page on that site. It can be with or without protocol prefix.
cancellationToken  CancellationToken  (Optional)
a token used to cancel the operation.

Return Value

TaskString
The URL of Api Endpoint. OR null if such search has failed.
Exceptions
ExceptionCondition
ArgumentNullExceptionclient or urlExpression is null.
TimeoutExceptionA time-out has been reached during test requests.
OperationCanceledExceptionOperation has been cancelled.
See Also