public MediaWiki undoRevision(final MediaWiki.EditToken editToken, final long revisionID, final String editSummary, final boolean bot, final Boolean minor) throws IOException, MediaWiki.MediaWikiException {
		final Map<String, String> getParams = paramValuesToMap("action", "edit", "format", "xml");
		final Map<String, String> postParams = paramValuesToMap("title", editToken.getFullPageName(), "token", editToken.getTokenText(), "starttimestamp", iso8601TimestampParser.format(editToken.getStartTime()), "undo", Long.toString(revisionID), "summary", editSummary);
		if (bot) {
			postParams.put("bot", "true");
		}
		if (minor != null) {
			postParams.put(minor ? "minor" : "notminor", "true");
		}
		if (editToken.getLastRevisionTime() != null) {
			postParams.put("basetimestamp", iso8601TimestampParser.format(editToken.getLastRevisionTime()));
		}

		final String url = createApiGetUrl(getParams);

		networkLock.lock();
		try {
			final InputStream in = post(url, postParams);
			final Document xml = parse(in);
			checkError(xml);

			final NodeList editTags = xml.getElementsByTagName("edit");

			if (editTags.getLength() > 0) {
				final Element editTag = (Element) editTags.item(0);

				if (editTag.hasAttribute("result")) {
					if (editTag.getAttribute("result").equals("Success"))
						return this;
					else
						throw new MediaWiki.ActionFailureException(editTag.getAttribute("result"));
				} else
					throw new MediaWiki.ResponseFormatException("expected <edit result=\"\"> attribute not present");
			} else
				throw new MediaWiki.ResponseFormatException("expected <edit> tag not present");
		} finally {
			networkLock.unlock();
		}
	}