CXuesong / WikiClientLibrary

/*🌻*/ Wiki Client Library is an asynchronous MediaWiki API client library targeting modern .NET platforms
https://github.com/CXuesong/WikiClientLibrary/wiki
Apache License 2.0
80 stars 16 forks source link

support ?action=raw #35

Closed HarelM closed 6 years ago

HarelM commented 6 years ago

Hi, I'm not sure if I'm missing something or not, but I couldn't find a way to return the raw content of a page. The only thing I thought was remotely relevant is AbuseFilter but I couldn't understand how to use it... Here's a link to an example: https://en.wikipedia.org/wiki/Main_Page?action=raw

CXuesong commented 6 years ago

Actually, for rendering a wiki page into HTML, you can use WikiSiteExtensions.ParsePageAsync extension methods to achieve the same goal, while you can obtain some more information, such as TOC and/or display title of the page,

HarelM commented 6 years ago

Found that FetchContent with RefreshAsync achieves what I need.

CXuesong commented 6 years ago

Oops, I've got it confused with ?action=render. Glad you have found the API!