Alias¶
-
class
wikibase_api.models.
Alias
(api)¶ Collection of API functions for aliases
Example function call:
from wikibase_api import Wikibase wb = Wikibase( # Parameters ) r = wb.alias.add("Q1", "The Universe", "en") print(r)
-
add
(entity_id, aliases, language)¶ Add one or multiple new aliases to the specified entity
Parameters: - entity_id (str) – Entity identifier (e.g.
"Q1"
) - aliases (str or list(str)) – Aliases to add to the existing ones
- language (str) – Language of the description (e.g.
"en"
)
Returns: Response
Return type: dict
- entity_id (str) – Entity identifier (e.g.
-
remove
(entity_id, aliases, language)¶ Remove one or multiple aliases from the specified entity
Parameters: - entity_id (str) – Entity identifier (e.g.
"Q1"
) - aliases (str or list(str)) – Existing aliases to remove
- language (str) – Language of the description (e.g.
"en"
)
Returns: Response
Return type: dict
- entity_id (str) – Entity identifier (e.g.
-
replace_all
(entity_id, aliases, language)¶ Replace all existing aliases with the specified one(s) for an entity
Parameters: - entity_id (str) – Entity identifier (e.g.
"Q1"
) - aliases (str or list(str)) – Aliases to add after deleting all existing ones
- language (str) – Language of the description (e.g.
"en"
)
Returns: Response
Return type: dict
- entity_id (str) – Entity identifier (e.g.
-