summaryrefslogtreecommitdiff
path: root/bin/wiki/vendor/addwiki/mediawiki-api-base/src/MediawikiApiInterface.php
diff options
context:
space:
mode:
Diffstat (limited to 'bin/wiki/vendor/addwiki/mediawiki-api-base/src/MediawikiApiInterface.php')
-rw-r--r--bin/wiki/vendor/addwiki/mediawiki-api-base/src/MediawikiApiInterface.php60
1 files changed, 60 insertions, 0 deletions
diff --git a/bin/wiki/vendor/addwiki/mediawiki-api-base/src/MediawikiApiInterface.php b/bin/wiki/vendor/addwiki/mediawiki-api-base/src/MediawikiApiInterface.php
new file mode 100644
index 00000000..83580676
--- /dev/null
+++ b/bin/wiki/vendor/addwiki/mediawiki-api-base/src/MediawikiApiInterface.php
@@ -0,0 +1,60 @@
+<?php
+
+namespace Mediawiki\Api;
+
+/**
+ * @since 2.2
+ * @licence GNU GPL v2+
+ * @author Addshore
+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
+ */
+interface MediawikiApiInterface extends ApiRequester, AsyncApiRequester {
+
+ /**
+ * @since 2.2
+ *
+ * @return bool|string false or the name of the current user
+ */
+ public function isLoggedin();
+
+ /**
+ * @since 2.2
+ *
+ * @param ApiUser $apiUser The ApiUser to log in as.
+ *
+ * @throws UsageException
+ * @return bool success
+ */
+ public function login( ApiUser $apiUser );
+
+ /**
+ * @since 2.2
+ *
+ * @return bool success
+ */
+ public function logout();
+
+ /**
+ * @since 2.2
+ *
+ * @param string $type The type of token to get.
+ *
+ * @return string
+ */
+ public function getToken( $type = 'csrf' );
+
+ /**
+ * @since 2.2
+ *
+ * Clears all tokens stored by the api
+ */
+ public function clearTokens();
+
+ /**
+ * @since 2.2
+ *
+ * @return string
+ */
+ public function getVersion();
+
+}