Uses of Class
org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException
Package
Description
Package for example programs that demonstrate how to use Wikidata Toolkit in practice.
Components for accessing the Web API of a Wikibase website, such as wikidata.org.
-
Uses of MediaWikiApiErrorException in org.wikidata.wdtk.examples
Modifier and TypeMethodDescriptionstatic void
EditOnlineDataExample.findSomeStringProperties
(ApiConnection connection) Finds properties of datatype string on test.wikidata.org.static void
static void
static void
static void
-
Uses of MediaWikiApiErrorException in org.wikidata.wdtk.wikibaseapi
Modifier and TypeMethodDescriptionvoid
ApiConnection.checkCredentials()
Checks that the credentials are still valid for the user currently logged in.void
OAuthApiConnection.checkCredentials()
Checks if the OAuth credentials (i.e., consumer key/secret and access token/secret) are still valid.protected void
ApiConnection.checkErrors
(com.fasterxml.jackson.databind.JsonNode root) Checks if an API response contains an error and throws a suitable exception in this case.void
BasicApiConnection.clearCookies()
Clears the set of cookies.protected void
BasicApiConnection.confirmClientLogin
(String token, String username, String password) Issues a Web API query to confirm that the previous client login attempt was successful, and sets the internal state of the API connection accordingly in this case.protected void
BasicApiConnection.confirmLogin
(String token, String username, String password) Issues a Web API query to confirm that the previous login attempt was successful, and sets the internal state of the API connection accordingly in this case.WikibaseDataEditor.createEntityDocument
(EntityDocument document, String summary, List<String> tags) Creates new entity document.WikibaseDataEditor.createItemDocument
(ItemDocument document, String summary, List<String> tags) Creates new item document.WikibaseDataEditor.createLexemeDocument
(LexemeDocument document, String summary, List<String> tags) Creates new lexeme document.WikibaseDataEditor.createPropertyDocument
(PropertyDocument document, String summary, List<String> tags) Creates new property document.WikibaseDataEditor.editEntityDocument
(EntityUpdate update, boolean clear, String summary, List<String> tags) UpdatesEntityDocument
entity.WikibaseDataEditor.editItemDocument
(ItemDocument itemDocument, boolean clear, String summary, List<String> tags) Deprecated.WikibaseDataEditor.editMediaInfoDocument
(MediaInfoDocument mediaInfoDocument, boolean clear, String summary, List<String> tags) Deprecated.WikibaseDataEditor.editPropertyDocument
(PropertyDocument propertyDocument, boolean clear, String summary, List<String> tags) Deprecated.double
WbEditingAction.getCurrentLag()
Retrieves the current lag from the target site, by making an API call.WikibaseDataFetcher.getEntityDocument
(String entityId) Fetches the documents for the entity of the given string IDs.WikibaseDataFetcher.getEntityDocumentByTitle
(String siteKey, String title) Fetches the document for the entity that has a page of the given title on the given site.WikibaseDataFetcher.getEntityDocuments
(String... entityIds) Fetches the documents for the entities of the given string IDs.WikibaseDataFetcher.getEntityDocuments
(List<String> entityIds) Fetches the documents for the entities of the given string IDs.WikibaseDataFetcher.getEntityDocumentsByTitle
(String siteKey, String... titles) Fetches the documents for the entities that have pages of the given titles on the given site.WikibaseDataFetcher.getEntityDocumentsByTitle
(String siteKey, List<String> titles) Fetches the documents for the entities that have pages of the given titles on the given site.WikibaseDataFetcher.getMediaInfoIdByFileName
(String fileName) Fetches the MediaInfoId of a file with the given name.MediaInfoIdQueryAction.getMediaInfoIds
(List<String> fileNames) Fetches the MediaInfoIds of files with the given names.WikibaseDataFetcher.getMediaInfoIdsByFileName
(String... fileNames) Fetches the MediaInfoIds of files with the given names.WikibaseDataFetcher.getMediaInfoIdsByFileName
(List<String> fileNames) Fetches the MediaInfoIds of files with the given names.abstract void
ApiConnection.logout()
Logs the current user out.void
BasicApiConnection.logout()
Logs the current user out.void
WikibaseDataEditor.nullEdit
(EntityIdValue entityId) Performs a null edit on an entity.<T extends StatementDocument>
voidWikibaseDataEditor.nullEdit
(ItemIdValue itemId) Deprecated.UseWikibaseDataEditor.nullEdit(EntityIdValue)
instead.<T extends StatementDocument>
voidWikibaseDataEditor.nullEdit
(PropertyIdValue propertyId) Deprecated.UseWikibaseDataEditor.nullEdit(EntityIdValue)
instead.<T extends EntityDocument>
TWikibaseDataEditor.nullEdit
(T currentDocument) Performs a null edit on an entity.StatementUpdate.performEdit
(WbEditingAction action, boolean editAsBot, String summary, List<String> tags) Deprecated.Performs the update, selecting the appropriate API action depending on the nature of the change.TermStatementUpdate.performEdit
(WbEditingAction action, boolean editAsBot, String summary, List<String> tags) Deprecated.Performs the update, selecting the appropriate API action depending on the nature of the change.WikibaseDataFetcher.searchEntities
(String search) WikibaseDataFetcher.searchEntities
(String search, Long limit) WikibaseDataFetcher.searchEntities
(String search, String language) WikibaseDataFetcher.searchEntities
(String search, String language, Long limit) WikibaseDataFetcher.searchEntities
(WbGetEntitiesSearchData properties) com.fasterxml.jackson.databind.JsonNode
ApiConnection.sendJsonRequest
(String requestMethod, Map<String, String> parameters) Sends a request to the API with the given parameters and the given request method and returns the result JSON tree.com.fasterxml.jackson.databind.JsonNode
ApiConnection.sendJsonRequest
(String requestMethod, Map<String, String> parameters, Map<String, org.apache.commons.lang3.tuple.ImmutablePair<String, File>> files) Sends a request to the API with the given parameters and the given request method and returns the result JSON tree.WikibaseDataEditor.updateStatements
(ItemIdValue itemIdValue, List<Statement> addStatements, List<Statement> deleteStatements, String summary, List<String> tags) Deprecated.WikibaseDataEditor.updateStatements
(PropertyIdValue propertyIdValue, List<Statement> addStatements, List<Statement> deleteStatements, String summary, List<String> tags) Deprecated.<T extends StatementDocument>
TWikibaseDataEditor.updateStatements
(T currentDocument, List<Statement> addStatements, List<Statement> deleteStatements, String summary, List<String> tags) Deprecated.WikibaseDataEditor.updateTermsStatements
(ItemIdValue itemIdValue, List<MonolingualTextValue> addLabels, List<MonolingualTextValue> addDescriptions, List<MonolingualTextValue> addAliases, List<MonolingualTextValue> deleteAliases, List<Statement> addStatements, List<Statement> deleteStatements, String summary, List<String> tags) Deprecated.<T extends TermedStatementDocument>
TWikibaseDataEditor.updateTermsStatements
(T currentDocument, List<MonolingualTextValue> addLabels, List<MonolingualTextValue> addDescriptions, List<MonolingualTextValue> addAliases, List<MonolingualTextValue> deleteAliases, List<Statement> addStatements, List<Statement> deleteStatements, String summary, List<String> tags) Deprecated.WbEditingAction.wbEditEntity
(String id, String site, String title, String newEntity, String data, boolean clear, boolean bot, long baserevid, String summary, List<String> tags) Executes the API action "wbeditentity" for the given parameters.WbGetEntitiesAction.wbGetEntities
(String ids, String sites, String titles, String props, String languages, String sitefilter) Creates a map of identifiers or page titles to documents retrieved via the API.WbGetEntitiesAction.wbGetEntities
(WbGetEntitiesActionData properties) Creates a map of identifiers or page titles to documents retrieved via the API URLcom.fasterxml.jackson.databind.JsonNode
WbEditingAction.wbRemoveClaims
(List<String> statementIds, boolean bot, long baserevid, String summary, List<String> tags) Executes the API action "wbremoveclaims" for the given parameters.WbSearchEntitiesAction.wbSearchEntities
(String search, String language, Boolean strictLanguage, String type, Long limit, Long offset) Keeping this for backwards compatibility, the real action happens inWbSearchEntitiesAction.wbSearchEntities(String, String, Boolean, String, Long, Long, String)
WbSearchEntitiesAction.wbSearchEntities
(String search, String language, Boolean strictLanguage, String type, Long limit, Long offset, String uselang) Executes the API action "wbsearchentity" for the given parameters.WbSearchEntitiesAction.wbSearchEntities
(WbGetEntitiesSearchData properties) com.fasterxml.jackson.databind.JsonNode
WbEditingAction.wbSetAliases
(String id, String site, String title, String newEntity, String language, List<String> add, List<String> remove, List<String> set, boolean bot, long baserevid, String summary, List<String> tags) Executes the API action "wbsetaliases" for the given parameters.com.fasterxml.jackson.databind.JsonNode
WbEditingAction.wbSetClaim
(String statement, boolean bot, long baserevid, String summary, List<String> tags) Executes the API action "wbsetclaim" for the given parameters.com.fasterxml.jackson.databind.JsonNode
WbEditingAction.wbSetDescription
(String id, String site, String title, String newEntity, String language, String value, boolean bot, long baserevid, String summary, List<String> tags) Executes the API action "wbsetlabel" for the given parameters.com.fasterxml.jackson.databind.JsonNode
WbEditingAction.wbSetLabel
(String id, String site, String title, String newEntity, String language, String value, boolean bot, long baserevid, String summary, List<String> tags) Executes the API action "wbsetlabel" for the given parameters. -
Uses of MediaWikiApiErrorException in org.wikidata.wdtk.wikibaseapi.apierrors
Modifier and TypeClassDescriptionclass
Exception to indicate that we tried to perform an action while our login credentials have expired.class
Exception to indicate a MediaWiki API error caused by an edit conflict.class
Exception to indicate a MediaWiki API error caused by exceeding the maxlag parameter.class
Exception to indicate a MediaWiki API error caused by trying to access an entity that does not exist.class
Error thrown when one of the supplied tags for an edit does not exist or cannot be applied manually.class
Exception to indicate a MediaWiki API error caused by missing or invalid token.Modifier and TypeMethodDescriptionstatic void
MediaWikiApiErrorHandler.throwMediaWikiApiErrorException
(String errorCode, String errorMessage) Creates and throws a suitableMediaWikiApiErrorException
for the given error code and message.
WikibaseDataEditor.editEntityDocument(EntityUpdate, boolean, String, List)
instead.