public class MediaInfoIdQueryAction extends Object
Constructor and Description |
---|
MediaInfoIdQueryAction(ApiConnection connection,
String siteIri) |
Modifier and Type | Method and Description |
---|---|
Map<String,MediaInfoIdValue> |
getMediaInfoIds(List<String> fileNames)
Fetches the MediaInfoIds of files with the given names.
|
public MediaInfoIdQueryAction(ApiConnection connection, String siteIri)
public Map<String,MediaInfoIdValue> getMediaInfoIds(List<String> fileNames) throws IOException, MediaWikiApiErrorException
This method only works with file name (e.g. "File:Albert Einstein Head.jpg"). The "File:" prefix can be omitted, in this case, it will be automatically added during processing. For example, "Albert Einstein Head.jpg" will be processed as "File:Albert Einstein Head.jpg".
Notice that pages other than file pages will also be fitted with the "File:" prefix. For example, "Main Page" will be processed as "File:Main Page", which doesn't exist. So always make sure you are dealing with file name.
fileNames
- list of file names of the requested MediaInfoIdsIOException
MediaWikiApiErrorException
Copyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage