diff --git a/src/MediawikiApi.php b/src/MediawikiApi.php index ada3071..3449d2f 100644 --- a/src/MediawikiApi.php +++ b/src/MediawikiApi.php @@ -103,6 +103,15 @@ public function __construct( $apiUrl, ClientInterface $client = null, MediawikiS $this->logger = new NullLogger(); } + /** + * Get the API URL (the URL to which API requests are sent, usually ending in api.php). + * This is useful if you've created this object via MediawikiApi::newFromPage(). + * @return string The API URL. + */ + public function getApiUrl() { + return $this->apiUrl; + } + /** * @return ClientInterface */