API Reference¶
-
class
wikibase_api.
Wikibase
(api_url='https://www.wikidata.org/w/api.php', oauth_credentials=None, login_credentials=None, is_bot=False, summary='Modified using wikibase-api for Python', config_path=None)¶ This is the Wikibase API wrapper class.
Parameters: - api_url (str) – URL to the API of the relevant Wikibase instance. Default:
"https://www.wikidata.org/w/api.php"
. For a local instance, you might use"http://localhost:8181/w/api.php"
- oauth_credentials (dict) – Dictionary with the keys
consumer_key
,consumer_secret
,access_token
, andaccess_secret
- login_credentials (dict) – Dictionary with the keys
bot_username
andbot_password
- is_bot (bool) – Mark edits as created by a bot. Default:
false
- summary (str) – Summary for edits. An auto-generated comment will be added before the summary.
Together, they cannot be longer than 260 characters. Default:
"Modified using wikibase-api for Python"
- config_path (str) – Path to a config.json configuration file. If specified, the other parameters are loaded from this file. The default values are the same as above
- api_url (str) – URL to the API of the relevant Wikibase instance. Default: