WikiClientLibrary Versions Save

/*🌻*/ Wiki Client Library is a portable & asynchronous MediaWiki API client library on .NET Standard.

v0.8.0-int.0

3 years ago
  • Re-targeted WCL packages to .NET Standard 2.1 & .NET 5.0 (#82)
  • Enabled Nullable Reference Type in a subset of the packages (noted below)

WikiClientLibrary

  • Remove dependency on CXuesong.AsyncEnumerableExtensions since we have native async iterator function (async stream) support now.
  • Enable Nullable Reference Type support.
  • Introduce implicit conversions on WikiPageStub. You can now implicitly convert WikiPage instance, page title (string) or page ID (int) into WikiPageStub
  • Now WikiPagePropertyList and its dervied classes accept WikiPageStub instead of page title and page ID. You can leverage the implicit conversion above to pass in the page information.
  • WikiSite.SearchApiEndpointAsync is now cancellable.
  • Added UploadResult.StashErrors property. (MW 1.29+)
  • Added WikiPage.CreateCategoriesGenerator extension method.
  • Added MediaWikiVersion.{In, Above} methods for comparing version without instantiating one.
  • Rectified the constructor overloads of MediaWikiVersion. All the version segments should be of short type.
  • Type fix: EntityQueryOptions.SupressRedirects --> EntityQueryOptions.SuppressRedirects
  • Add (CSRF) token parameter in WikiSite.LogoutAsync on earlier MW versions since security fix of phab:T25227 has been back-ported to
    • MW 1.27.6+
    • MW 1.30.2+
    • MW 1.31.2+
    • MW 1.32.2+
    • MW 1.33-rc.0+
  • Now PatrolAsync can refresh CSRF token automatically if the cached token is invalid.

WikiClientLibrary.Cargo

  • Enable Nullable Reference Type support.
  • Bug fix: Endless loop when enumerating empty sequence from CargoRecordQueryable.

WikiClientLibrary.Flow

This package will not receive any feature updates.

WikiClientLibrary.Wikibase

  • Enable Nullable Reference Type support.
  • Added Entity.IdFromSiteLinkAsync to retrieve a single Wikibase entity ID from site link.

WikiClientLibrary.Wikia

For migrated FANDOM sites MW 1.33+ (See UCP migration post), you need to use Bot Password in order to login successfully.

Some of the Wikia API v1 is not working on UCP. We are still waiting for UCP migration to complete before we can start on revamp these APIs in WCL.

  • WikiaSite.LogoutAsync: For migrated FANDOM sites (on MW 1.33+), action=logout is now available now and we won't use the mitigation as described in #40

v0.7.5

3 years ago

This version of WCL release is intended to be the last version that targets .NET Standard 2.0 or below. That is, .NET Framework, .NET Core 2.1 or below are no longer supported since v0.8.x. (#82)

WikiClientLibrary

  • OperationFailedException now also includes customized error message from MediaWiki site. (e.g. the details of wikibase-api-permissiondenied error).

WikiClientLibrary.Cargo

This is a new library for querying tables on MediaWiki sites with Cargo extension. (#77) This library also provides LINQ to Cargo support!

  • Go to CargoTests in UnitTestProject1 or \Samples\LinqToCargo.csproj to check it out!

WikiClientLibrary.Flow

There is no update in this release. This library will not receive feature updates in the near future as the development of StructuredDiscussion is stalled:

The StructuredDiscussions extension was developed by the Collaboration team at the Wikimedia Foundation. It is still being maintained to fix bugs, but no substantial development on the extension has been done since 2015, other than a rename to "StructuredDiscussions" in September 2017. Development may possibly start again in the future.

WikiClientLibrary.Wikia

There is no update in this release.

WikiClientLibrary.Wikibase

  • Bug fix: WbQuantity.ToString throws InvalidOperationException when WbQuantity.Unit is unity (1).
  • Improve error message for wrong snak dataValue type (#80; thanks @mormegil-cz ! )

v0.7.4

3 years ago
  • Add FileInfoPropertyProvider.QueryExtMetadata property and FileRevision.ExtMetadata, so you can query for HTML-rendered image/file metadata. (Thanks @FaFre !)

v0.7.3

3 years ago
  • Emit warning instead of throwing error in case there are conflicting canonical names on certain wiki site. (#73)

v0.7.2

3 years ago
  • Now any parsing failures in MediaWikiVersion.Parse will throw FormatException instead of ArgumentException.
  • Optionally allow truncating version suffix in MediaWikiVersion.Parse, if the dashed suffix does not fall in any of the standard MediaWiki dev channel. So MediaWiki versions like 1.19.5-1+deb7u1 won't cause FormatException. (#72)
    • This will make TFWiki contributors' day way better XD
  • SiteInfo.Version now allows version suffix truncation.

v0.7.1

4 years ago
  • Make CategoryPropertyProvider public (#69)
  • If some continuation param is absent since a certain pagination page, we remove it from the next request instead of using the previous existing value (#69)

v0.7.0

4 years ago

For changes since v0.6.x, see the descriptions of v0.7.0-int.x pre-releases.


  • Correctly handle badvalue error introduced since MW 1.35.0-wmf.19 (#65)
    • Added BadValueException for general badvalue or unknown_* errors.
    • InvalidActionException is now a derived class from BadValueException.
  • Now WCL gives you more specific exception message if you are using TLS version that is incompatible with remote site's (#66)
  • Fixed ArgumentNullException when the result list paginates if you specify multiple titles in WikiPagePropertyList<T> (#67)

Wikibase

  • Fixed incorrect implementation of SerializableEntity.LoadAll overload function.
  • Fixed the incorrect WbQuantity deserilization logic for unity (1) unit parsing.

v0.7.0-int.9

4 years ago

Bug fix: WikiPagePropertyProvider.GetMaxPaginationSize used value that is too large.

v0.7.0-int.8

4 years ago

New features

  • Added LanguageLinksPropertyProvider. Now you can enumerate the language links on a MediaWiki page.
  • Now WikiPagePropertyProvider supports pagination. You will be able to fetch for language links on multiple pages without worrying about some page may have too many language links. WCL will take care of that for you.

Other changes

  • Moved WikiClientLibrary.Pages.Parsing.InterlanguageInfo to WikiClientLibrary.Pages.Queries.Properties.LanguageLinkInfo.
  • Deprecated LanguageLinkInfo.PageTitle in favor of LanguageLinkInfo.Title.
  • Deprecated ParsedContentInfo.Interlanguages in favor of ParsedContentInfo.LanguageLinks.
  • Now RequestHelper.RefreshPages won't send rvlimit=1 anymore, as this is superfluous and can cause uncessary prop list pagination.

v0.7.0-int.7

4 years ago
  • Some of the packages are not published to NuGet registry as they are not modified in code.

Bug fix

  • WikiPagePropertyProvider used wrong (reversed) PaginationSize for users with apiHighLimits right.
  • Fixed a regression from long long ago, that we should retry the request when receiving the maxlag error from the MW API invocation.

Improvments

  • Introduced continuation loop detection and basic continuation loop handling. (crystal-pool/SiteLinkSynchronizer#1)
    • "Continuation loop" means the situation where the parameter values for list/generator continuation provided by server response are exactly the same as your request. This usually happens on legacy MediaWiki sites with high log volume.
    • If there is an unrecoverable continuation loop detected during enumerating the list, an UnexpectedDataException will be thrown.
    • You can specify WikiListCompatibilityOptions.ContinuationLoopBehaviors to enable the possible recovery approach(es) to get out of the loop situation.
      • Use WikiListContinuationLoopBehaviors.FetchMore to try fetching more items in the hope that the server will return a different parameter value for continuation.
  • Added UnauthorizedOperationException.DesiredPermissions property.
  • Added ServerLagException for maxlag MW API error.