mediawiki-0.2.4: Interfacing with the MediaWiki API

Portabilityportable
Stabilityprovisional
MaintainerSigbjorn Finne <sof@forkIO.com>
Safe HaskellSafe-Infered

MediaWiki.API

Description

A Haskell MediaWiki API binding.

Synopsis

Documentation

webGet :: URLString -> Request -> IO StringSource

webGet url req issues a GET to a MediaWiki server, appending api.php? followed by the request req to the URL base url.

webPost :: Maybe AuthUser -> URLString -> String -> Request -> IO ([(String, String)], String)Source

webGet mbUser url req issues a POST to a MediaWiki server, appending api.php? followed by the request req to the URL base url.

loginWiki :: URLString -> String -> String -> IO (Maybe LoginResponse)Source

loginWiki u usr pass logs in to MediaWiki install at url as user usr with password credentials pass. Notice that we don't presently allow HTTP Auth to happen in conjunction with the Wiki login.

catchMW :: IO a -> (MediaWikiError -> IO a) -> IO aSource

handleMW :: (MediaWikiError -> IO a) -> IO a -> IO aSource