Package org.openrefine.wikibase.editing
Class MediaFileUtils.MediaUploadResponse
- java.lang.Object
-
- org.openrefine.wikibase.editing.MediaFileUtils.MediaUploadResponse
-
- Enclosing class:
- MediaFileUtils
public static class MediaFileUtils.MediaUploadResponse extends Object
-
-
Constructor Summary
Constructors Constructor Description MediaUploadResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkForErrors()
Checks that the upload was successful, and if not raise an exceptionorg.wikidata.wdtk.datamodel.interfaces.MediaInfoIdValue
getMid(org.wikidata.wdtk.wikibaseapi.ApiConnection connection, String siteIri)
Retrieves the Mid, either from the upload response or by issuing another call to obtain it from the filename through the supplied connection.
-
-
-
Method Detail
-
checkForErrors
public void checkForErrors() throws org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException
Checks that the upload was successful, and if not raise an exception- Throws:
org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException
-
getMid
public org.wikidata.wdtk.datamodel.interfaces.MediaInfoIdValue getMid(org.wikidata.wdtk.wikibaseapi.ApiConnection connection, String siteIri) throws IOException, org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException
Retrieves the Mid, either from the upload response or by issuing another call to obtain it from the filename through the supplied connection. This should not be needed anymore when this is already exposed in the API response of the upload action. https://phabricator.wikimedia.org/T307096- Parameters:
connection
-- Returns:
- Throws:
org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException
IOException
-
-