public class WbSearchEntitiesAction extends Object
Constructor and Description |
---|
WbSearchEntitiesAction(ApiConnection connection,
String siteUri)
Creates an object to fetch data from the given ApiConnection.
|
Modifier and Type | Method and Description |
---|---|
List<WbSearchEntitiesResult> |
wbSearchEntities(String search,
String language,
Boolean strictLanguage,
String type,
Long limit,
Long offset)
Keeping this for backwards compatibility, the real action happens in
wbSearchEntities(String, String, Boolean, String, Long, Long, String) |
List<WbSearchEntitiesResult> |
wbSearchEntities(String search,
String language,
Boolean strictLanguage,
String type,
Long limit,
Long offset,
String uselang)
Executes the API action "wbsearchentity" for the given parameters.
|
List<WbSearchEntitiesResult> |
wbSearchEntities(WbGetEntitiesSearchData properties) |
public WbSearchEntitiesAction(ApiConnection connection, String siteUri)
connection
- ApiConnection
Object to send the requestssiteUri
- the URI identifying the site that is accessed (usually the
prefix of entity URIs), e.g.,
"http://www.wikidata.org/entity/"public List<WbSearchEntitiesResult> wbSearchEntities(WbGetEntitiesSearchData properties) throws MediaWikiApiErrorException, IOException
public List<WbSearchEntitiesResult> wbSearchEntities(String search, String language, Boolean strictLanguage, String type, Long limit, Long offset) throws MediaWikiApiErrorException, IOException
wbSearchEntities(String, String, Boolean, String, Long, Long, String)
public List<WbSearchEntitiesResult> wbSearchEntities(String search, String language, Boolean strictLanguage, String type, Long limit, Long offset, String uselang) throws MediaWikiApiErrorException, IOException
See the online API documentation for further information.
search
- (required) search for this textlanguage
- (required) search in this languagestrictLanguage
- (optional) whether to disable language fallbacktype
- (optional) search for this type of entity
One of the following values: item, property
Default: itemlimit
- (optional) maximal number of results
no more than 50 (500 for bots) allowed
Default: 7offset
- (optional) offset where to continue a search
Default: 0
this parameter is called "continue" in the API (which is a Java keyword)uselang
- (optional) the response should have this language, default enMediaWikiApiErrorException
- if the API returns an errorIllegalArgumentException
- if the given combination of parameters does not make senseMalformedResponseException
- if response JSON cannot be parsedIOException
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