python-blizzardapi is a client library for Blizzard's APIs.
Project description
python-blizzardapi
python-blizzardapi is a client library for Blizzard's APIs.
Current supported features include:
- Battle.net User
- WoW Profile
- WoW Game Data
- Diablo 3 Game Data
To gain access to Blizzard's API please register here to obtain a client id and client secret.
For more information on Blizzard's API visit:
Official Documentation
Official API Forum
Requirements
Python (3.6, 3.7, 3.8, 3.9)
Installing
pip install python-blizzardapi
Example
main.py
from blizzardapi import BlizzardApi
api_client = BlizzardApi("client_id", "client_secret")
# Unprotected API endpoint
categories_index = api_client.wow.game_data.get_achievement_categories_index("us", "en_US")
# Protected API Endpoint
summary = api_client.wow.profile.get_account_profile_summary("us", "en_US", "access_token")
Access token vs Client ID/Client Secret
You can pass in a client_id
and client_secret
and use almost any endpoint except for a few that require an access_token
obtained via OAuth authorization code flow. You can find more information at https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow.
Here is the list of endpoints, specified by Blizzard, that require an OAuth token.
GET /oauth/userinfo
GET /profile/user/wow
GET /profile/user/wow/protected-character/{realm-id}-{character-id}
GET /profile/user/wow/collections
GET /profile/user/wow/collections/pets
GET /profile/user/wow/collections/mounts
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python_blizzardapi-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de6bf77a6c463d1c823ed19c949cd063e238edef0fd30487c7af463df9015d6d |
|
MD5 | f646bf1228f745e04fc38a2e541a6df5 |
|
BLAKE2b-256 | f62de43228f8d2960a8b7e6d602a1fefeb8268e80132b655b07a85585f4d6cf5 |