Skip to main content

python-blizzardapi is a client library for Blizzard's APIs.

Project description

python-blizzardapi

Python package codecov GitHub PyPI PyPI - Python Version

python-blizzardapi is a client library for Blizzard's APIs.

Current supported features include:

  • Battle.net User
  • Wow Profile
  • Wow Game Data
  • Wow Classic Game Data
  • Diablo 3 Community
  • Diablo 3 Game Data
  • Hearthstone 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")

# Wow Classic endpoint
connected_realms_index = api_client.wow.game_data.get_connected_realms_index("us", "en_US", is_classic=True)

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

python-blizzardapi-1.2.2.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_blizzardapi-1.2.2-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file python-blizzardapi-1.2.2.tar.gz.

File metadata

  • Download URL: python-blizzardapi-1.2.2.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for python-blizzardapi-1.2.2.tar.gz
Algorithm Hash digest
SHA256 f58e422853fccccdd584c8b3f549933dc98418b3d79e899197986a2b3f2609c3
MD5 818898ce324e32e40adf1584c67b32e6
BLAKE2b-256 2940e8ed830a69a334d3eb201b808ab068380fdc3317eb99bd6f04b857895e03

See more details on using hashes here.

File details

Details for the file python_blizzardapi-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: python_blizzardapi-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for python_blizzardapi-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a00dfe19da024172f79e6de8fd9ed997ee7f6e8276d44e3010849024536cece7
MD5 ae630bfa059a40188156036c20beb1bb
BLAKE2b-256 dee71d90a7ed809754b05c625dc42257ba9741e59d6eeed357bdc16943ff56a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page