blizzardapi2 2.1.1__tar.gz → 2.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. blizzardapi2-2.1.3/.github/workflows/black.yml +13 -0
  2. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/.github/workflows/python-package.yml +35 -7
  3. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/PKG-INFO +14 -4
  4. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/README.md +7 -2
  5. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/_version.py +2 -2
  6. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/api.py +60 -36
  7. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/blizzard_api.py +9 -10
  8. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/diablo3/diablo3_community_api.py +12 -4
  9. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/hearthstone/hearthstone_api.py +9 -3
  10. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/hearthstone/hearthstone_game_data_api.py +12 -4
  11. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/starcraft2/starcraft2_api.py +12 -2
  12. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/starcraft2/starcraft2_community_api.py +60 -13
  13. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/starcraft2/starcraft2_game_data_api.py +6 -1
  14. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/types.py +4 -1
  15. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/wow/wow_game_data_api.py +4 -2
  16. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/wow/wow_profile_api.py +19 -8
  17. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2.egg-info/PKG-INFO +14 -4
  18. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2.egg-info/SOURCES.txt +2 -0
  19. blizzardapi2-2.1.3/package.json +27 -0
  20. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/pyproject.toml +15 -5
  21. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/uv.lock +27 -1
  22. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  23. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  24. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/.github/dependabot.yml +0 -0
  25. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/.gitignore +0 -0
  26. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/CODE_OF_CONDUCT.md +0 -0
  27. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/CONTRIBUTING.md +0 -0
  28. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/LICENSE +0 -0
  29. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/SECURITY.md +0 -0
  30. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/__init__.py +0 -0
  31. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/battlenet/__init__.py +0 -0
  32. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/battlenet/battlenet_api.py +0 -0
  33. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/battlenet/battlenet_oauth_api.py +0 -0
  34. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/diablo3/__init__.py +0 -0
  35. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/diablo3/diablo3_api.py +0 -0
  36. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/diablo3/diablo3_game_data_api.py +0 -0
  37. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/hearthstone/__init__.py +0 -0
  38. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/starcraft2/__init__.py +0 -0
  39. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/wow/__init__.py +0 -0
  40. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2/wow/wow_api.py +0 -0
  41. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2.egg-info/dependency_links.txt +0 -0
  42. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2.egg-info/requires.txt +0 -0
  43. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/blizzardapi2.egg-info/top_level.txt +0 -0
  44. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/docs/battlenet/README.md +0 -0
  45. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/docs/diablo3/README.md +0 -0
  46. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/docs/hearthstone/README.md +0 -0
  47. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/docs/pull_request_template.md +0 -0
  48. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/docs/starcraft2/README.md +0 -0
  49. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/docs/wow/README.md +0 -0
  50. {blizzardapi2-2.1.1 → blizzardapi2-2.1.3}/setup.cfg +0 -0
@@ -0,0 +1,13 @@
1
+ name: Lint
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ lint:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v4
10
+ - uses: psf/black@stable
11
+ with:
12
+ options: "--check --verbose"
13
+ src: "."
@@ -6,11 +6,13 @@ name: Python package
6
6
  on:
7
7
  push:
8
8
  branches: ["main"]
9
- pull_request:
10
- branches: ["main"]
9
+
10
+ # Add permissions block
11
+ permissions:
12
+ contents: write
11
13
 
12
14
  jobs:
13
- test:
15
+ checkout:
14
16
  runs-on: ubuntu-latest
15
17
  strategy:
16
18
  fail-fast: false
@@ -20,7 +22,7 @@ jobs:
20
22
  steps:
21
23
  - uses: actions/checkout@v4
22
24
  with:
23
- fetch-depth: 0 # Fetch all history for setuptools_scm
25
+ fetch-depth: 0
24
26
 
25
27
  - name: Set up Python ${{ matrix.python-version }}
26
28
  uses: actions/setup-python@v5
@@ -41,7 +43,7 @@ jobs:
41
43
  uv pip install -e ".[dev]"
42
44
 
43
45
  publish:
44
- needs: test
46
+ needs: checkout
45
47
  if: github.ref == 'refs/heads/main'
46
48
  runs-on: ubuntu-latest
47
49
  steps:
@@ -66,6 +68,10 @@ jobs:
66
68
  - name: Install dependencies
67
69
  run: |
68
70
  uv pip install -e ".[dev]"
71
+ - name: Configure Git
72
+ run: |
73
+ git config --global user.name "lostcol0ny"
74
+ git config --global user.email "c098os0k@4wrd.cc"
69
75
 
70
76
  - name: Build and publish to PyPI
71
77
  run: |
@@ -75,9 +81,31 @@ jobs:
75
81
  CURRENT_VERSION=$(grep 'version = ' pyproject.toml | cut -d'"' -f2)
76
82
  # Split version into major.minor.patch
77
83
  IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION"
78
- # Increment minor version
79
- NEW_VERSION="$MAJOR.$((MINOR + 1)).$PATCH"
84
+ # Increment patch version
85
+ NEW_VERSION="$MAJOR.$MINOR.$((PATCH + 1))"
80
86
  # Update version in pyproject.toml
81
87
  sed -i "s/version = \".*\"/version = \"$NEW_VERSION\"/" pyproject.toml
88
+ # Update version in package.json
89
+ sed -i "s/\"version\": \".*\"/\"version\": \"$NEW_VERSION\"/" package.json
90
+ # Commit the version changes
91
+ git add pyproject.toml package.json
92
+ git commit -m "chore: bump version to $NEW_VERSION"
93
+ git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
82
94
  python -m build
83
95
  twine upload dist/* --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
96
+ release:
97
+ needs: publish
98
+ runs-on: ubuntu-latest
99
+ steps:
100
+ - name: Checkout repository
101
+ uses: actions/checkout@v4
102
+ - name: Setup Node.js
103
+ uses: actions/setup-node@v4
104
+ with:
105
+ node-version: "18.x"
106
+ - name: Install npm dependencies
107
+ run: npm install
108
+ - name: Run release script
109
+ env:
110
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111
+ run: npm run release
@@ -1,9 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blizzardapi2
3
- Version: 2.1.1
3
+ Version: 2.1.3
4
4
  Summary: A Python wrapper for Blizzard API
5
5
  Author-email: lostcol0ny <c098os0k@4wrd.cc>
6
- License: MIT
6
+ License-Expression: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.11
9
+ Classifier: Programming Language :: Python :: 3.12
10
+ Classifier: Programming Language :: Python :: 3.13
11
+ Classifier: Operating System :: OS Independent
7
12
  Requires-Python: >=3.11
8
13
  Description-Content-Type: text/markdown
9
14
  License-File: LICENSE
@@ -22,9 +27,14 @@ Requires-Dist: black<25.0.0,>=24.4.2; extra == "dev"
22
27
  Requires-Dist: ruff<1.0.0,>=0.3.0; extra == "dev"
23
28
  Dynamic: license-file
24
29
 
25
- # blizzardapi2
30
+ # Blizzard API 2
26
31
 
27
- ![GitHub](https://img.shields.io/github/license/lostcol0ny/python-blizzardapi2)[![Pytest](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/python-package.yml/badge.svg?branch=main)](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/python-package.yml)[![Dependabot](https://github.com/lostcol0ny/blizzardapi2/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/lostcol0ny/blizzardapi2/actions/workflows/dependabot/dependabot-updates)[![CodeQL](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/github-code-scanning/codeql)[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
32
+ [![PyPI version](https://badge.fury.io/py/blizzardapi2.svg)](https://badge.fury.io/py/blizzardapi2)
33
+ [![Python Versions](https://img.shields.io/pypi/pyversions/blizzardapi2.svg)](https://pypi.org/project/blizzardapi2/)
34
+ [![Downloads](https://img.shields.io/pypi/dm/blizzardapi2.svg)](https://pypi.org/project/blizzardapi2/)
35
+ [![Build Status](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/python-package.yml/badge.svg)](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/python-package.yml)
36
+
37
+ ![GitHub](https://img.shields.io/github/license/lostcol0ny/python-blizzardapi2)[![Dependabot](https://github.com/lostcol0ny/blizzardapi2/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/lostcol0ny/blizzardapi2/actions/workflows/dependabot/dependabot-updates)[![CodeQL](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/github-code-scanning/codeql)[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
28
38
 
29
39
  blizzardapi2 is a client library for Blizzard's APIs. It's a fork of [the original library](https://github.com/trevorphillipscoding/python-blizzardapi/).
30
40
 
@@ -1,6 +1,11 @@
1
- # blizzardapi2
1
+ # Blizzard API 2
2
2
 
3
- ![GitHub](https://img.shields.io/github/license/lostcol0ny/python-blizzardapi2)[![Pytest](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/python-package.yml/badge.svg?branch=main)](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/python-package.yml)[![Dependabot](https://github.com/lostcol0ny/blizzardapi2/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/lostcol0ny/blizzardapi2/actions/workflows/dependabot/dependabot-updates)[![CodeQL](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/github-code-scanning/codeql)[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
3
+ [![PyPI version](https://badge.fury.io/py/blizzardapi2.svg)](https://badge.fury.io/py/blizzardapi2)
4
+ [![Python Versions](https://img.shields.io/pypi/pyversions/blizzardapi2.svg)](https://pypi.org/project/blizzardapi2/)
5
+ [![Downloads](https://img.shields.io/pypi/dm/blizzardapi2.svg)](https://pypi.org/project/blizzardapi2/)
6
+ [![Build Status](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/python-package.yml/badge.svg)](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/python-package.yml)
7
+
8
+ ![GitHub](https://img.shields.io/github/license/lostcol0ny/python-blizzardapi2)[![Dependabot](https://github.com/lostcol0ny/blizzardapi2/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/lostcol0ny/blizzardapi2/actions/workflows/dependabot/dependabot-updates)[![CodeQL](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/github-code-scanning/codeql)[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
4
9
 
5
10
  blizzardapi2 is a client library for Blizzard's APIs. It's a fork of [the original library](https://github.com/trevorphillipscoding/python-blizzardapi/).
6
11
 
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '1.1.4b1.dev15+g18e4615.d20250615014319'
21
- __version_tuple__ = version_tuple = (1, 1, 4, 'b1', 'dev15', 'g18e4615.d20250615014319')
20
+ __version__ = version = '2.0.8.dev6+gecd749f'
21
+ __version_tuple__ = version_tuple = (2, 0, 8, 'dev6', 'gecd749f')
@@ -2,7 +2,7 @@
2
2
 
3
3
  from dataclasses import dataclass
4
4
  from enum import Enum
5
- from typing import (Any, Dict, Literal, Optional, Protocol, TypedDict)
5
+ from typing import Any, Dict, Literal, Optional, Protocol, TypedDict
6
6
 
7
7
  import aiohttp
8
8
  import requests
@@ -236,9 +236,9 @@ class BaseApi:
236
236
  def __del__(self):
237
237
  """Clean up resources."""
238
238
  try:
239
- if hasattr(self, '_session'):
239
+ if hasattr(self, "_session"):
240
240
  self._session.close()
241
- if hasattr(self, '_async_session') and self._async_session is not None:
241
+ if hasattr(self, "_async_session") and self._async_session is not None:
242
242
  if not self._async_session.closed:
243
243
  self._async_session.close()
244
244
  except Exception:
@@ -266,21 +266,30 @@ class BaseApi:
266
266
  TokenError: If the token request fails.
267
267
  """
268
268
  if self._token is None or self._is_token_expired():
269
- response = self._session.post(
270
- f"https://{self._region}.battle.net/oauth/token",
271
- auth=(self._client_id, self._client_secret),
272
- data={"grant_type": "client_credentials"},
273
- )
274
- if response.status_code != 200:
275
- raise TokenError(
276
- f"Failed to get token: {response.status_code} {response.reason}",
277
- response=response,
269
+ try:
270
+ url = "https://oauth.battle.net/oauth/token"
271
+ response = self._session.post(
272
+ url,
273
+ auth=(self._client_id, self._client_secret),
274
+ data={"grant_type": "client_credentials"},
278
275
  )
279
- data = response.json()
280
- self._token = data["access_token"]
281
- self._token_type = data["token_type"]
282
- self._token_expires_in = data["expires_in"]
283
- self._token_created_at = response.elapsed.total_seconds()
276
+ if response.status_code != 200:
277
+ error_msg = f"Failed to get token: {response.status_code} {response.reason}"
278
+ try:
279
+ error_data = response.json()
280
+ error_msg += f"\nError details: {error_data}"
281
+ except:
282
+ error_msg += f"\nResponse body: {response.text}"
283
+ raise TokenError(error_msg, response=response)
284
+ data = response.json()
285
+ self._token = data["access_token"]
286
+ self._token_type = data["token_type"]
287
+ self._token_expires_in = data["expires_in"]
288
+ self._token_created_at = response.elapsed.total_seconds()
289
+ except Exception as e:
290
+ if not isinstance(e, TokenError):
291
+ raise TokenError(f"Unexpected error getting token: {str(e)}")
292
+ raise
284
293
  return self._token
285
294
 
286
295
  async def _get_token_async(self) -> str:
@@ -293,24 +302,33 @@ class BaseApi:
293
302
  TokenError: If the token request fails.
294
303
  """
295
304
  if self._token is None or self._is_token_expired():
296
- if self._async_session is None:
297
- self._async_session = aiohttp.ClientSession()
298
- response = await self._async_session.post(
299
- f"https://{self._region}.battle.net/oauth/token",
300
- auth=aiohttp.BasicAuth(self._client_id, self._client_secret),
301
- data={"grant_type": "client_credentials"},
302
- )
303
- if response.status != 200:
304
- raise TokenError(
305
- f"Failed to get token: {response.status} {response.reason}",
306
- response=response,
305
+ try:
306
+ if self._async_session is None:
307
+ self._async_session = aiohttp.ClientSession()
308
+ url = "https://oauth.battle.net/oauth/token"
309
+ response = await self._async_session.post(
310
+ url,
311
+ auth=aiohttp.BasicAuth(self._client_id, self._client_secret),
312
+ data={"grant_type": "client_credentials"},
307
313
  )
308
- data = await response.json()
309
- self._token = data["access_token"]
310
- self._token_type = data["token_type"]
311
- self._token_expires_in = data["expires_in"]
312
- self._token_created_at = response.elapsed.total_seconds()
313
- await response.release()
314
+ if response.status != 200:
315
+ error_msg = f"Failed to get token: {response.status} {response.reason}"
316
+ try:
317
+ error_data = await response.json()
318
+ error_msg += f"\nError details: {error_data}"
319
+ except:
320
+ error_msg += f"\nResponse body: {await response.text()}"
321
+ raise TokenError(error_msg, response=response)
322
+ data = await response.json()
323
+ self._token = data["access_token"]
324
+ self._token_type = data["token_type"]
325
+ self._token_expires_in = data["expires_in"]
326
+ self._token_created_at = response.elapsed.total_seconds()
327
+ await response.release()
328
+ except Exception as e:
329
+ if not isinstance(e, TokenError):
330
+ raise TokenError(f"Unexpected error getting token: {str(e)}")
331
+ raise
314
332
  return self._token
315
333
 
316
334
  def _is_token_expired(self) -> bool:
@@ -346,9 +364,12 @@ class BaseApi:
346
364
  TokenError: If the token request fails.
347
365
  """
348
366
  token = self._get_token()
367
+ headers = {"Authorization": f"Bearer {token}"}
368
+ endpoint = endpoint.lstrip('/')
349
369
  response = self._session.get(
350
370
  f"https://{region}.api.blizzard.com/{endpoint}",
351
- params={"locale": self._locale, "access_token": token, **query_params},
371
+ headers=headers,
372
+ params={"locale": self._locale, **query_params},
352
373
  )
353
374
  if response.status_code != 200:
354
375
  raise TokenError(
@@ -379,9 +400,12 @@ class BaseApi:
379
400
  token = await self._get_token_async()
380
401
  if self._async_session is None:
381
402
  self._async_session = aiohttp.ClientSession()
403
+ headers = {"Authorization": f"Bearer {token}"}
404
+ endpoint = endpoint.lstrip('/')
382
405
  response = await self._async_session.get(
383
406
  f"https://{region}.api.blizzard.com/{endpoint}",
384
- params={"locale": self._locale, "access_token": token, **query_params},
407
+ headers=headers,
408
+ params={"locale": self._locale, **query_params},
385
409
  )
386
410
  if response.status != 200:
387
411
  raise TokenError(
@@ -5,7 +5,6 @@ a single client instance. Each game's API is accessible through its own
5
5
  property on the main client.
6
6
  """
7
7
 
8
-
9
8
  from .api import BaseApi
10
9
  from .battlenet.battlenet_api import BattlenetApi
11
10
  from .diablo3.diablo3_api import Diablo3Api
@@ -48,9 +47,9 @@ class BlizzardApi(BaseApi):
48
47
 
49
48
  async def __aenter__(self) -> "BlizzardApi":
50
49
  """Async context manager entry.
51
-
50
+
52
51
  Initializes async sessions for all game API clients.
53
-
52
+
54
53
  Returns:
55
54
  BlizzardApi: The initialized API client.
56
55
  """
@@ -61,12 +60,12 @@ class BlizzardApi(BaseApi):
61
60
  await self.wow.__aenter__()
62
61
  await self.starcraft2.__aenter__()
63
62
  return self
64
-
63
+
65
64
  async def __aexit__(self, exc_type, exc_val, exc_tb) -> None:
66
65
  """Async context manager exit.
67
-
66
+
68
67
  Closes async sessions for all game API clients.
69
-
68
+
70
69
  Args:
71
70
  exc_type: The type of exception that was raised, if any.
72
71
  exc_val: The exception instance that was raised, if any.
@@ -78,20 +77,20 @@ class BlizzardApi(BaseApi):
78
77
  await self.hearthstone.__aexit__(exc_type, exc_val, exc_tb)
79
78
  await self.wow.__aexit__(exc_type, exc_val, exc_tb)
80
79
  await self.starcraft2.__aexit__(exc_type, exc_val, exc_tb)
81
-
80
+
82
81
  @property
83
82
  def client_id(self) -> str:
84
83
  """Get the client ID.
85
-
84
+
86
85
  Returns:
87
86
  str: The Blizzard API client ID.
88
87
  """
89
88
  return self._client_id
90
-
89
+
91
90
  @property
92
91
  def client_secret(self) -> str:
93
92
  """Get the client secret.
94
-
93
+
95
94
  Returns:
96
95
  str: The Blizzard API client secret.
97
96
  """
@@ -51,7 +51,9 @@ class Diablo3CommunityApi(BaseApi):
51
51
  query_params = {"locale": locale}
52
52
  return self.get_resource(resource, region, query_params)
53
53
 
54
- async def get_act_index_async(self, region: Region, locale: Locale) -> Dict[str, Any]:
54
+ async def get_act_index_async(
55
+ self, region: Region, locale: Locale
56
+ ) -> Dict[str, Any]:
55
57
  """Get an index of acts asynchronously.
56
58
 
57
59
  Args:
@@ -86,7 +88,9 @@ class Diablo3CommunityApi(BaseApi):
86
88
  query_params = {"locale": locale}
87
89
  return self.get_resource(resource, region, query_params)
88
90
 
89
- async def get_act_async(self, region: Region, locale: Locale, act_id: int) -> Dict[str, Any]:
91
+ async def get_act_async(
92
+ self, region: Region, locale: Locale, act_id: int
93
+ ) -> Dict[str, Any]:
90
94
  """Get a single act by ID asynchronously.
91
95
 
92
96
  Args:
@@ -325,7 +329,9 @@ class Diablo3CommunityApi(BaseApi):
325
329
  query_params = {"locale": locale}
326
330
  return self.get_resource(resource, region, query_params)
327
331
 
328
- async def get_item_type_index_async(self, region: Region, locale: Locale) -> Dict[str, Any]:
332
+ async def get_item_type_index_async(
333
+ self, region: Region, locale: Locale
334
+ ) -> Dict[str, Any]:
329
335
  """Get an index of item types asynchronously.
330
336
 
331
337
  Args:
@@ -679,7 +685,9 @@ class Diablo3CommunityApi(BaseApi):
679
685
  query_params = {"locale": locale}
680
686
  return self.get_resource(resource, region, query_params)
681
687
 
682
- async def get_season_index_async(self, region: Region, locale: Locale) -> Dict[str, Any]:
688
+ async def get_season_index_async(
689
+ self, region: Region, locale: Locale
690
+ ) -> Dict[str, Any]:
683
691
  """Get the current season index asynchronously.
684
692
 
685
693
  Args:
@@ -102,7 +102,9 @@ class HearthstoneApi(BaseApi):
102
102
  query_params = {"locale": locale}
103
103
  return self.get_resource(resource, region, query_params)
104
104
 
105
- async def get_card_backs_async(self, region: Region, locale: Locale) -> Dict[str, Any]:
105
+ async def get_card_backs_async(
106
+ self, region: Region, locale: Locale
107
+ ) -> Dict[str, Any]:
106
108
  """Get all card backs asynchronously.
107
109
 
108
110
  Args:
@@ -136,7 +138,9 @@ class HearthstoneApi(BaseApi):
136
138
  query_params = {"locale": locale}
137
139
  return self.get_resource(resource, region, query_params)
138
140
 
139
- async def get_metadata_async(self, region: Region, locale: Locale) -> Dict[str, Any]:
141
+ async def get_metadata_async(
142
+ self, region: Region, locale: Locale
143
+ ) -> Dict[str, Any]:
140
144
  """Get metadata asynchronously.
141
145
 
142
146
  Args:
@@ -171,7 +175,9 @@ class HearthstoneApi(BaseApi):
171
175
  query_params = {"locale": locale}
172
176
  return self.get_resource(resource, region, query_params)
173
177
 
174
- async def get_card_async(self, region: Region, locale: Locale, card_id: str) -> Dict[str, Any]:
178
+ async def get_card_async(
179
+ self, region: Region, locale: Locale, card_id: str
180
+ ) -> Dict[str, Any]:
175
181
  """Get a single card asynchronously.
176
182
 
177
183
  Args:
@@ -86,7 +86,9 @@ class HearthstoneGameDataApi(BaseApi):
86
86
  query_params = {"locale": locale}
87
87
  return self.get_resource(resource, region, query_params)
88
88
 
89
- def get_card_search(self, region: Region, locale: Locale, **kwargs) -> Dict[str, Any]:
89
+ def get_card_search(
90
+ self, region: Region, locale: Locale, **kwargs
91
+ ) -> Dict[str, Any]:
90
92
  """Search for cards with optional filters.
91
93
 
92
94
  Args:
@@ -121,7 +123,9 @@ class HearthstoneGameDataApi(BaseApi):
121
123
  query_params = {"locale": locale}
122
124
  return self.get_resource(resource, region, query_params)
123
125
 
124
- def get_card_back(self, region: Region, locale: Locale, card_back_id: str) -> Dict[str, Any]:
126
+ def get_card_back(
127
+ self, region: Region, locale: Locale, card_back_id: str
128
+ ) -> Dict[str, Any]:
125
129
  """Get a single card back by ID.
126
130
 
127
131
  Args:
@@ -139,7 +143,9 @@ class HearthstoneGameDataApi(BaseApi):
139
143
  query_params = {"locale": locale}
140
144
  return self.get_resource(resource, region, query_params)
141
145
 
142
- def get_deck(self, region: Region, locale: Locale, deck_code: str) -> Dict[str, Any]:
146
+ def get_deck(
147
+ self, region: Region, locale: Locale, deck_code: str
148
+ ) -> Dict[str, Any]:
143
149
  """Get a deck by deck code.
144
150
 
145
151
  Args:
@@ -157,7 +163,9 @@ class HearthstoneGameDataApi(BaseApi):
157
163
  query_params = {"locale": locale}
158
164
  return self.get_resource(resource, region, query_params)
159
165
 
160
- def get_metadata_search(self, region: Region, locale: Locale, **kwargs) -> Dict[str, Any]:
166
+ def get_metadata_search(
167
+ self, region: Region, locale: Locale, **kwargs
168
+ ) -> Dict[str, Any]:
161
169
  """Search for metadata with optional filters.
162
170
 
163
171
  Args:
@@ -31,7 +31,12 @@ class Starcraft2Api(BaseApi):
31
31
  self.game_data = Starcraft2GameDataApi(client_id, client_secret)
32
32
 
33
33
  def get_league_data(
34
- self, region: Region, locale: Locale, season_id: int, queue_id: int, team_type: int
34
+ self,
35
+ region: Region,
36
+ locale: Locale,
37
+ season_id: int,
38
+ queue_id: int,
39
+ team_type: int,
35
40
  ) -> Dict[str, Any]:
36
41
  """Get league data for a specific season, queue, and team type.
37
42
 
@@ -91,7 +96,12 @@ class Starcraft2Api(BaseApi):
91
96
  return self.get_resource(resource, region, query_params)
92
97
 
93
98
  def get_player_ladder(
94
- self, region: Region, locale: Locale, profile_id: int, realm_id: int, ladder_id: int
99
+ self,
100
+ region: Region,
101
+ locale: Locale,
102
+ profile_id: int,
103
+ realm_id: int,
104
+ ladder_id: int,
95
105
  ) -> Dict[str, Any]:
96
106
  """Get a player's ladder information.
97
107
 
@@ -51,7 +51,9 @@ class Starcraft2CommunityApi(BaseApi):
51
51
  """
52
52
  super().__init__(client_id, client_secret)
53
53
 
54
- def get_static(self, region: Region, locale: Locale, region_id: int) -> dict[str, Any]:
54
+ def get_static(
55
+ self, region: Region, locale: Locale, region_id: int
56
+ ) -> dict[str, Any]:
55
57
  """Get all static SC2 profile data.
56
58
 
57
59
  This includes achievements, categories, criteria, and rewards.
@@ -72,7 +74,12 @@ class Starcraft2CommunityApi(BaseApi):
72
74
  return self.get_resource(resource, region, query_params)
73
75
 
74
76
  def get_metadata(
75
- self, region: Region, locale: Locale, region_id: int, realm_id: int, profile_id: int
77
+ self,
78
+ region: Region,
79
+ locale: Locale,
80
+ region_id: int,
81
+ realm_id: int,
82
+ profile_id: int,
76
83
  ) -> dict[str, Any]:
77
84
  """Get metadata for an individual's profile.
78
85
 
@@ -152,7 +159,12 @@ class Starcraft2CommunityApi(BaseApi):
152
159
  return await self.get_resource_async(resource, region, query_params)
153
160
 
154
161
  def get_ladder_summary(
155
- self, region: Region, locale: Locale, region_id: int, realm_id: int, profile_id: int
162
+ self,
163
+ region: Region,
164
+ locale: Locale,
165
+ region_id: int,
166
+ realm_id: int,
167
+ profile_id: int,
156
168
  ) -> dict[str, Any]:
157
169
  """Get a ladder summary for an individual SC2 profile.
158
170
 
@@ -174,7 +186,12 @@ class Starcraft2CommunityApi(BaseApi):
174
186
  return self.get_resource(resource, region, query_params)
175
187
 
176
188
  async def get_ladder_summary_async(
177
- self, region: Region, locale: Locale, region_id: int, realm_id: int, profile_id: int
189
+ self,
190
+ region: Region,
191
+ locale: Locale,
192
+ region_id: int,
193
+ realm_id: int,
194
+ profile_id: int,
178
195
  ) -> dict[str, Any]:
179
196
  """Get a ladder summary for an individual SC2 profile asynchronously.
180
197
 
@@ -222,7 +239,9 @@ class Starcraft2CommunityApi(BaseApi):
222
239
  Raises:
223
240
  ApiError: If the API request fails.
224
241
  """
225
- resource = f"/sc2/profile/{region_id}/{realm_id}/{profile_id}/ladder/{ladder_id}"
242
+ resource = (
243
+ f"/sc2/profile/{region_id}/{realm_id}/{profile_id}/ladder/{ladder_id}"
244
+ )
226
245
  query_params["locale"] = locale
227
246
  return self.get_resource(resource, region, query_params)
228
247
 
@@ -253,7 +272,9 @@ class Starcraft2CommunityApi(BaseApi):
253
272
  Raises:
254
273
  ApiError: If the API request fails.
255
274
  """
256
- resource = f"/sc2/profile/{region_id}/{realm_id}/{profile_id}/ladder/{ladder_id}"
275
+ resource = (
276
+ f"/sc2/profile/{region_id}/{realm_id}/{profile_id}/ladder/{ladder_id}"
277
+ )
257
278
  query_params["locale"] = locale
258
279
  return await self.get_resource_async(resource, region, query_params)
259
280
 
@@ -297,7 +318,9 @@ class Starcraft2CommunityApi(BaseApi):
297
318
  query_params = {"locale": locale}
298
319
  return await self.get_resource_async(resource, region, query_params)
299
320
 
300
- def get_season(self, region: Region, locale: Locale, region_id: int) -> dict[str, Any]:
321
+ def get_season(
322
+ self, region: Region, locale: Locale, region_id: int
323
+ ) -> dict[str, Any]:
301
324
  """Get data about the current season.
302
325
 
303
326
  Args:
@@ -315,7 +338,9 @@ class Starcraft2CommunityApi(BaseApi):
315
338
  query_params = {"locale": locale}
316
339
  return self.get_resource(resource, region, query_params)
317
340
 
318
- async def get_season_async(self, region: Region, locale: Locale, region_id: int) -> dict[str, Any]:
341
+ async def get_season_async(
342
+ self, region: Region, locale: Locale, region_id: int
343
+ ) -> dict[str, Any]:
319
344
  """Get data about the current season asynchronously.
320
345
 
321
346
  Args:
@@ -334,7 +359,12 @@ class Starcraft2CommunityApi(BaseApi):
334
359
  return await self.get_resource_async(resource, region, query_params)
335
360
 
336
361
  def get_league_data(
337
- self, region: Region, locale: Locale, season_id: int, queue_id: int, team_type: int
362
+ self,
363
+ region: Region,
364
+ locale: Locale,
365
+ season_id: int,
366
+ queue_id: int,
367
+ team_type: int,
338
368
  ) -> dict[str, Any]:
339
369
  """Get league data for a specific season, queue, and team type.
340
370
 
@@ -356,7 +386,12 @@ class Starcraft2CommunityApi(BaseApi):
356
386
  return self.get_resource(resource, region, query_params)
357
387
 
358
388
  async def get_league_data_async(
359
- self, region: Region, locale: Locale, season_id: int, queue_id: int, team_type: int
389
+ self,
390
+ region: Region,
391
+ locale: Locale,
392
+ season_id: int,
393
+ queue_id: int,
394
+ team_type: int,
360
395
  ) -> dict[str, Any]:
361
396
  """Get league data for a specific season, queue, and team type asynchronously.
362
397
 
@@ -378,7 +413,12 @@ class Starcraft2CommunityApi(BaseApi):
378
413
  return await self.get_resource_async(resource, region, query_params)
379
414
 
380
415
  def get_player_ladder_summary(
381
- self, region: Region, locale: Locale, region_id: int, realm_id: int, profile_id: int
416
+ self,
417
+ region: Region,
418
+ locale: Locale,
419
+ region_id: int,
420
+ realm_id: int,
421
+ profile_id: int,
382
422
  ) -> dict[str, Any]:
383
423
  """Get a player's ladder summary.
384
424
 
@@ -400,7 +440,12 @@ class Starcraft2CommunityApi(BaseApi):
400
440
  return self.get_resource(resource, region, query_params)
401
441
 
402
442
  async def get_player_ladder_summary_async(
403
- self, region: Region, locale: Locale, region_id: int, realm_id: int, profile_id: int
443
+ self,
444
+ region: Region,
445
+ locale: Locale,
446
+ region_id: int,
447
+ realm_id: int,
448
+ profile_id: int,
404
449
  ) -> dict[str, Any]:
405
450
  """Get a player's ladder summary asynchronously.
406
451
 
@@ -421,7 +466,9 @@ class Starcraft2CommunityApi(BaseApi):
421
466
  query_params = {"locale": locale}
422
467
  return await self.get_resource_async(resource, region, query_params)
423
468
 
424
- def get_player(self, region: Region, locale: Locale, account_id: int) -> dict[str, Any]:
469
+ def get_player(
470
+ self, region: Region, locale: Locale, account_id: int
471
+ ) -> dict[str, Any]:
425
472
  """Get metadata for an individual's account.
426
473
 
427
474
  Args:
@@ -50,7 +50,12 @@ class Starcraft2GameDataApi(BaseApi):
50
50
  super().__init__(client_id, client_secret)
51
51
 
52
52
  def get_league_data(
53
- self, region: Region, season_id: int, queue_id: int, team_type: int, league_id: int
53
+ self,
54
+ region: Region,
55
+ season_id: int,
56
+ queue_id: int,
57
+ team_type: int,
58
+ league_id: int,
54
59
  ) -> dict[str, Any]:
55
60
  """Get data for the specified season, queue, team, and league.
56
61
 
@@ -3,14 +3,17 @@ from enum import Enum
3
3
 
4
4
  class Region(str, Enum):
5
5
  """Region enum for Blizzard API endpoints."""
6
+
6
7
  US = "us"
7
8
  EU = "eu"
8
9
  KR = "kr"
9
10
  TW = "tw"
10
11
  CN = "cn"
11
12
 
13
+
12
14
  class Locale(str, Enum):
13
15
  """Locale enum for Blizzard API responses."""
16
+
14
17
  EN_US = "en_US"
15
18
  EN_GB = "en_GB"
16
19
  ES_ES = "es_ES"
@@ -23,4 +26,4 @@ class Locale(str, Enum):
23
26
  RU_RU = "ru_RU"
24
27
  KO_KR = "ko_KR"
25
28
  ZH_TW = "zh_TW"
26
- ZH_CN = "zh_CN"
29
+ ZH_CN = "zh_CN"
@@ -2617,6 +2617,8 @@ class WowGameDataApi(BaseApi):
2617
2617
  """
2618
2618
  resource = "/data/wow/token/index"
2619
2619
  namespace = f"dynamic-classic-{region}" if is_classic else f"dynamic-{region}"
2620
- query_params = {"namespace": namespace, "locale": locale}
2620
+ query_params = {
2621
+ "namespace": namespace,
2622
+ "locale": locale,
2623
+ }
2621
2624
  return self.get_resource(resource, region, query_params)
2622
-
@@ -587,16 +587,19 @@ class WowProfileApi(BaseApi):
587
587
  Return a profile summary for a character.
588
588
 
589
589
  Args:
590
- region (str): The region to query.
591
- locale (str): The locale to use for the response.
590
+ region (Region): The region to query.
591
+ locale (Locale): The locale to use for the response.
592
592
  realm_slug (str): The slug of the realm.
593
593
  character_name (str): The name of the character.
594
594
 
595
595
  Returns:
596
- Dict[str, Any]: A dictionary containing the character's profile summary.
596
+ dict[str, Any]: A dictionary containing the character profile summary.
597
597
  """
598
598
  resource = f"/profile/wow/character/{realm_slug}/{character_name}"
599
- query_params = {"namespace": f"profile-{region}", "locale": locale}
599
+ query_params = {
600
+ "namespace": f"profile-{region}",
601
+ "locale": locale,
602
+ }
600
603
  return self.get_resource(resource, region, query_params)
601
604
 
602
605
  def get_character_profile_status(
@@ -875,25 +878,33 @@ class WowProfileApi(BaseApi):
875
878
  query_params = {"namespace": f"profile-{region}", "locale": locale}
876
879
  return self.get_resource(resource, region, query_params)
877
880
 
878
- def get_character_profile(self, region: Region, locale: Locale, realm: str, character: str) -> Dict[str, Any]:
881
+ def get_character_profile(
882
+ self, region: Region, locale: Locale, realm: str, character: str
883
+ ) -> Dict[str, Any]:
879
884
  """Get a character profile."""
880
885
  resource = f"/profile/wow/character/{realm}/{character}"
881
886
  query_params = {"locale": locale}
882
887
  return self.get_resource(resource, region, query_params)
883
888
 
884
- async def get_character_profile_async(self, region: Region, locale: Locale, realm: str, character: str) -> Dict[str, Any]:
889
+ async def get_character_profile_async(
890
+ self, region: Region, locale: Locale, realm: str, character: str
891
+ ) -> Dict[str, Any]:
885
892
  """Get a character profile asynchronously."""
886
893
  resource = f"/profile/wow/character/{realm}/{character}"
887
894
  query_params = {"locale": locale}
888
895
  return await self.get_resource_async(resource, region, query_params)
889
896
 
890
- def get_character_achievements(self, region: Region, locale: Locale, realm: str, character: str) -> Dict[str, Any]:
897
+ def get_character_achievements(
898
+ self, region: Region, locale: Locale, realm: str, character: str
899
+ ) -> Dict[str, Any]:
891
900
  """Get a character's achievements."""
892
901
  resource = f"/profile/wow/character/{realm}/{character}/achievements"
893
902
  query_params = {"locale": locale}
894
903
  return self.get_resource(resource, region, query_params)
895
904
 
896
- async def get_character_achievements_async(self, region: Region, locale: Locale, realm: str, character: str) -> Dict[str, Any]:
905
+ async def get_character_achievements_async(
906
+ self, region: Region, locale: Locale, realm: str, character: str
907
+ ) -> Dict[str, Any]:
897
908
  """Get a character's achievements asynchronously."""
898
909
  resource = f"/profile/wow/character/{realm}/{character}/achievements"
899
910
  query_params = {"locale": locale}
@@ -1,9 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blizzardapi2
3
- Version: 2.1.1
3
+ Version: 2.1.3
4
4
  Summary: A Python wrapper for Blizzard API
5
5
  Author-email: lostcol0ny <c098os0k@4wrd.cc>
6
- License: MIT
6
+ License-Expression: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.11
9
+ Classifier: Programming Language :: Python :: 3.12
10
+ Classifier: Programming Language :: Python :: 3.13
11
+ Classifier: Operating System :: OS Independent
7
12
  Requires-Python: >=3.11
8
13
  Description-Content-Type: text/markdown
9
14
  License-File: LICENSE
@@ -22,9 +27,14 @@ Requires-Dist: black<25.0.0,>=24.4.2; extra == "dev"
22
27
  Requires-Dist: ruff<1.0.0,>=0.3.0; extra == "dev"
23
28
  Dynamic: license-file
24
29
 
25
- # blizzardapi2
30
+ # Blizzard API 2
26
31
 
27
- ![GitHub](https://img.shields.io/github/license/lostcol0ny/python-blizzardapi2)[![Pytest](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/python-package.yml/badge.svg?branch=main)](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/python-package.yml)[![Dependabot](https://github.com/lostcol0ny/blizzardapi2/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/lostcol0ny/blizzardapi2/actions/workflows/dependabot/dependabot-updates)[![CodeQL](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/github-code-scanning/codeql)[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
32
+ [![PyPI version](https://badge.fury.io/py/blizzardapi2.svg)](https://badge.fury.io/py/blizzardapi2)
33
+ [![Python Versions](https://img.shields.io/pypi/pyversions/blizzardapi2.svg)](https://pypi.org/project/blizzardapi2/)
34
+ [![Downloads](https://img.shields.io/pypi/dm/blizzardapi2.svg)](https://pypi.org/project/blizzardapi2/)
35
+ [![Build Status](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/python-package.yml/badge.svg)](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/python-package.yml)
36
+
37
+ ![GitHub](https://img.shields.io/github/license/lostcol0ny/python-blizzardapi2)[![Dependabot](https://github.com/lostcol0ny/blizzardapi2/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/lostcol0ny/blizzardapi2/actions/workflows/dependabot/dependabot-updates)[![CodeQL](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/github-code-scanning/codeql)[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
28
38
 
29
39
  blizzardapi2 is a client library for Blizzard's APIs. It's a fork of [the original library](https://github.com/trevorphillipscoding/python-blizzardapi/).
30
40
 
@@ -4,11 +4,13 @@ CONTRIBUTING.md
4
4
  LICENSE
5
5
  README.md
6
6
  SECURITY.md
7
+ package.json
7
8
  pyproject.toml
8
9
  uv.lock
9
10
  .github/dependabot.yml
10
11
  .github/ISSUE_TEMPLATE/bug_report.md
11
12
  .github/ISSUE_TEMPLATE/feature_request.md
13
+ .github/workflows/black.yml
12
14
  .github/workflows/python-package.yml
13
15
  blizzardapi2/__init__.py
14
16
  blizzardapi2/_version.py
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "blizzardapi2",
3
+ "version": "2.1.3",
4
+ "private": true,
5
+ "scripts": {
6
+ "release": "release-it"
7
+ },
8
+ "devDependencies": {
9
+ "release-it": "^17.0.0"
10
+ },
11
+ "release-it": {
12
+ "git": {
13
+ "commitMessage": "chore: release v${version}",
14
+ "tagName": "v${version}"
15
+ },
16
+ "github": {
17
+ "release": true,
18
+ "releaseName": "Release v${version}",
19
+ "releaseNotes": "git log --pretty=format:\"* %s (%h)\" ${latestTag}...HEAD"
20
+ },
21
+ "hooks": {
22
+ "after:bump": [
23
+ "sed -i 's/version = \".*\"/version = \"${version}\"/' pyproject.toml"
24
+ ]
25
+ }
26
+ }
27
+ }
@@ -1,9 +1,9 @@
1
1
  [project]
2
2
  name = "blizzardapi2"
3
- version = "2.1.1"
3
+ version = "2.1.3"
4
4
  description = "A Python wrapper for Blizzard API"
5
5
  authors = [{ name = "lostcol0ny", email = "c098os0k@4wrd.cc" }]
6
- license = { text = "MIT" }
6
+ license = "MIT"
7
7
  readme = "README.md"
8
8
  dependencies = [
9
9
  "requests>=2.32.3,<3.0.0",
@@ -15,14 +15,24 @@ dependencies = [
15
15
  "aiohttp>=3.12.12",
16
16
  ]
17
17
  requires-python = ">=3.11"
18
+ classifiers = [
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Operating System :: OS Independent",
24
+ ]
18
25
 
19
26
  [build-system]
20
27
  requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=6.2"]
21
28
  build-backend = "setuptools.build_meta"
22
29
 
30
+ [tool.setuptools]
31
+ packages = ["blizzardapi2"]
32
+
23
33
  [tool.setuptools_scm]
24
- write_to = "blizzardapi2/_version.py" # Optional: write version to a file
25
- local_scheme = "node-and-timestamp" # Optional: include local version info
34
+ write_to = "blizzardapi2/_version.py"
35
+ local_scheme = "node-and-timestamp"
26
36
 
27
37
  [project.optional-dependencies]
28
38
  dev = [
@@ -68,7 +78,7 @@ exclude = [
68
78
  line-length = 120
69
79
 
70
80
  # Assume Python 3.1
71
- target-version = "2.1.1"
81
+ target-version = "2.1.3"
72
82
 
73
83
  [tool.ruff.lint]
74
84
  # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
@@ -138,7 +138,7 @@ wheels = [
138
138
 
139
139
  [[package]]
140
140
  name = "blizzardapi2"
141
- version = "1.1.3"
141
+ version = "2.1.0"
142
142
  source = { editable = "." }
143
143
  dependencies = [
144
144
  { name = "aiohttp" },
@@ -150,15 +150,29 @@ dependencies = [
150
150
  { name = "ruff" },
151
151
  ]
152
152
 
153
+ [package.optional-dependencies]
154
+ dev = [
155
+ { name = "black" },
156
+ { name = "pytest" },
157
+ { name = "pytest-asyncio" },
158
+ { name = "pytest-mock" },
159
+ { name = "ruff" },
160
+ ]
161
+
153
162
  [package.metadata]
154
163
  requires-dist = [
155
164
  { name = "aiohttp", specifier = ">=3.12.12" },
156
165
  { name = "black", specifier = ">=24.4.2,<25.0.0" },
166
+ { name = "black", marker = "extra == 'dev'", specifier = ">=24.4.2,<25.0.0" },
157
167
  { name = "pydantic", specifier = ">=2.11.6" },
158
168
  { name = "pytest", specifier = ">=8.2.2,<9.0.0" },
169
+ { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.2.2,<9.0.0" },
170
+ { name = "pytest-asyncio", marker = "extra == 'dev'", specifier = ">=0.23.5,<1.0.0" },
159
171
  { name = "pytest-mock", specifier = ">=3.14.0,<4.0.0" },
172
+ { name = "pytest-mock", marker = "extra == 'dev'", specifier = ">=3.14.0,<4.0.0" },
160
173
  { name = "requests", specifier = ">=2.32.3,<3.0.0" },
161
174
  { name = "ruff", specifier = ">=0.3.0,<1.0.0" },
175
+ { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.3.0,<1.0.0" },
162
176
  ]
163
177
 
164
178
  [[package]]
@@ -634,6 +648,18 @@ wheels = [
634
648
  { url = "https://files.pythonhosted.org/packages/2f/de/afa024cbe022b1b318a3d224125aa24939e99b4ff6f22e0ba639a2eaee47/pytest-8.4.0-py3-none-any.whl", hash = "sha256:f40f825768ad76c0977cbacdf1fd37c6f7a468e460ea6a0636078f8972d4517e", size = 363797 },
635
649
  ]
636
650
 
651
+ [[package]]
652
+ name = "pytest-asyncio"
653
+ version = "0.26.0"
654
+ source = { registry = "https://pypi.org/simple" }
655
+ dependencies = [
656
+ { name = "pytest" },
657
+ ]
658
+ sdist = { url = "https://files.pythonhosted.org/packages/8e/c4/453c52c659521066969523e87d85d54139bbd17b78f09532fb8eb8cdb58e/pytest_asyncio-0.26.0.tar.gz", hash = "sha256:c4df2a697648241ff39e7f0e4a73050b03f123f760673956cf0d72a4990e312f", size = 54156 }
659
+ wheels = [
660
+ { url = "https://files.pythonhosted.org/packages/20/7f/338843f449ace853647ace35870874f69a764d251872ed1b4de9f234822c/pytest_asyncio-0.26.0-py3-none-any.whl", hash = "sha256:7b51ed894f4fbea1340262bdae5135797ebbe21d8638978e35d31c6d19f72fb0", size = 19694 },
661
+ ]
662
+
637
663
  [[package]]
638
664
  name = "pytest-mock"
639
665
  version = "3.14.1"
File without changes
File without changes
File without changes
File without changes