A hand-crafted asynchronous MediaWiki API client library for wiki sites (including Wikipedia and its sister projects, as well as FANDOM and Wikia.org. The library targets at .NET 6.0 & 8.0 (See Supported Platforms), and focuses on the API compatibility with MediaWiki 1.19, as well as the state-of-art APIs of MediaWiki (i.e. 1.34-wmf, as in 2019-05). Other versions in between are hopefully also compatible.
For migrated FANDOM sites on MW 1.33+ (See UCP migration post), you may need to use Bot Password in order to login successfully.
If you are on prior versions of .NET Core or .NET Framework, you may use prior version of the WCL packages.
- WCL v0.7.x libraries target .NET Standard 1.1 and has dependency on
Newtonsoft.Json
- WCL v0.8.x libraries target .NET Standard 2.1, .NET 6.0 & .NET 8.0, and has dependency on
Newtonsoft.Json
The packages CXuesong.MW.WikiClientLibrary.*
are now available on NuGet. E.g. you may install the main package using the following command
# Package Management Console
Install-Package CXuesong.MW.WikiClientLibrary
# .NET CLI
dotnet add package CXuesong.MW.WikiClientLibrary
Package | Status |
---|---|
CXuesong.MW.WikiClientLibrary | |
CXuesong.MW.WikiClientLibrary.Cargo | |
CXuesong.MW.WikiClientLibrary.Flow | |
CXuesong.MW.WikiClientLibrary.Wikia | |
CXuesong.MW.WikiClientLibrary.Wikibase |
If you bump into bugs, have any suggestions or feature requests, feel free to open an issue. Any contributions on documentations (code annotations & repository wiki) are also welcomed. Thank you.
Developed in Visual Studio 2019, this portable & asynchronous MediaWiki API client provides an easy and asynchronous access to commonly-used MediaWiki API. The library has the following features
Login/logout via simple asynchronous functions.
CookieContainer
, and therefore has chance to persist it.IAsyncEnumerable
, which will ease the pain when using page generators.Other miscellaneous MediaWiki API, such as