blizzardapi2 2.1.7__tar.gz → 2.1.9__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 (53) hide show
  1. blizzardapi2-2.1.9/.github/workflows/README.md +108 -0
  2. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/.github/workflows/python-package.yml +14 -0
  3. {blizzardapi2-2.1.7/blizzardapi2.egg-info → blizzardapi2-2.1.9}/PKG-INFO +3 -3
  4. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/README.md +2 -2
  5. blizzardapi2-2.1.9/blizzardapi2/_version.py +34 -0
  6. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/api.py +1 -1
  7. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/battlenet/battlenet_api.py +2 -2
  8. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/battlenet/battlenet_oauth_api.py +2 -2
  9. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/diablo3/diablo3_community_api.py +2 -2
  10. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/diablo3/diablo3_game_data_api.py +2 -2
  11. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/hearthstone/hearthstone_api.py +2 -2
  12. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/hearthstone/hearthstone_game_data_api.py +2 -2
  13. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/starcraft2/starcraft2_community_api.py +2 -2
  14. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/starcraft2/starcraft2_game_data_api.py +2 -2
  15. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/wow/wow_game_data_api.py +2 -2
  16. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/wow/wow_profile_api.py +2 -2
  17. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9/blizzardapi2.egg-info}/PKG-INFO +3 -3
  18. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2.egg-info/SOURCES.txt +1 -0
  19. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/package.json +1 -1
  20. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/pyproject.toml +1 -1
  21. blizzardapi2-2.1.7/blizzardapi2/_version.py +0 -21
  22. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  23. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  24. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/.github/dependabot.yml +0 -0
  25. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/.github/workflows/black.yml +0 -0
  26. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/.gitignore +0 -0
  27. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/CODE_OF_CONDUCT.md +0 -0
  28. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/CONTRIBUTING.md +0 -0
  29. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/LICENSE +0 -0
  30. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/SECURITY.md +0 -0
  31. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/__init__.py +0 -0
  32. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/battlenet/__init__.py +0 -0
  33. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/blizzard_api.py +0 -0
  34. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/diablo3/__init__.py +0 -0
  35. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/diablo3/diablo3_api.py +0 -0
  36. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/hearthstone/__init__.py +0 -0
  37. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/starcraft2/__init__.py +0 -0
  38. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/starcraft2/starcraft2_api.py +0 -0
  39. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/types.py +0 -0
  40. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/wow/__init__.py +0 -0
  41. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2/wow/wow_api.py +0 -0
  42. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2.egg-info/dependency_links.txt +0 -0
  43. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2.egg-info/requires.txt +0 -0
  44. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/blizzardapi2.egg-info/top_level.txt +0 -0
  45. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/docs/battlenet/README.md +0 -0
  46. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/docs/diablo3/README.md +0 -0
  47. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/docs/hearthstone/README.md +0 -0
  48. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/docs/pull_request_template.md +0 -0
  49. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/docs/starcraft2/README.md +0 -0
  50. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/docs/wow/README.md +0 -0
  51. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/poetry.lock +0 -0
  52. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/setup.cfg +0 -0
  53. {blizzardapi2-2.1.7 → blizzardapi2-2.1.9}/uv.lock +0 -0
@@ -0,0 +1,108 @@
1
+ # GitHub Workflows
2
+
3
+ This directory contains GitHub Actions workflows for the blizzardapi2 project.
4
+
5
+ ## Workflows
6
+
7
+ ### 1. `python-package.yml` - Main CI/CD Pipeline
8
+
9
+ **Triggers:** Push to main branch
10
+
11
+ **Jobs:**
12
+
13
+ - **checkout**: Runs tests on multiple Python versions (3.11, 3.12, 3.13)
14
+ - **publish**: Builds and publishes to PyPI (only on main branch)
15
+ - **release**: Creates GitHub releases (only after successful publish)
16
+
17
+ **Recent Fixes Applied:**
18
+
19
+ - ✅ **Fixed Git identity issue** in release job
20
+ - ✅ **Added proper Git configuration** for automated commits
21
+ - ✅ **Enhanced permissions** for package publishing
22
+ - ✅ **Improved error handling** and environment variables
23
+
24
+ ### 2. `black.yml` - Code Formatting
25
+
26
+ **Triggers:** Push and pull requests
27
+
28
+ **Purpose:** Ensures code follows Black formatting standards
29
+
30
+ ## Issues Fixed
31
+
32
+ ### Git Identity Error
33
+
34
+ **Problem:** Release workflow failed with "Author identity unknown" error
35
+
36
+ ```
37
+ ERROR Error: Author identity unknown
38
+ *** Please tell me who you are.
39
+ ```
40
+
41
+ **Solution:** Added Git configuration in the release job:
42
+
43
+ ```yaml
44
+ - name: Configure Git
45
+ run: |
46
+ git config --global user.name "github-actions[bot]"
47
+ git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
48
+ ```
49
+
50
+ ### Additional Improvements
51
+
52
+ 1. **Enhanced Checkout Configuration:**
53
+
54
+ - Added `fetch-depth: 0` for full history access
55
+ - Added explicit token configuration
56
+
57
+ 2. **Better Permissions:**
58
+
59
+ - Added `packages: write` permission for PyPI publishing
60
+
61
+ 3. **Environment Variables:**
62
+ - Explicitly defined `PYPI_API_TOKEN` environment variable
63
+
64
+ ## Workflow Dependencies
65
+
66
+ The workflows require these secrets to be configured in the repository:
67
+
68
+ - `GITHUB_TOKEN` (automatically provided)
69
+ - `PYPI_API_TOKEN` (for PyPI publishing)
70
+
71
+ ## Troubleshooting
72
+
73
+ ### Common Issues
74
+
75
+ 1. **Git Identity Errors:**
76
+
77
+ - Ensure Git is configured in jobs that make commits
78
+ - Use the github-actions[bot] identity for automated commits
79
+
80
+ 2. **Permission Errors:**
81
+
82
+ - Check that the workflow has the necessary permissions
83
+ - Verify secrets are properly configured
84
+
85
+ 3. **Version Bumping Issues:**
86
+ - Ensure both `pyproject.toml` and `package.json` are updated
87
+ - Check that the sed commands work correctly on the runner OS
88
+
89
+ ### Debugging
90
+
91
+ To debug workflow issues:
92
+
93
+ 1. Check the Actions tab in GitHub
94
+ 2. Review the logs for specific error messages
95
+ 3. Test locally with act (GitHub Actions local runner)
96
+ 4. Verify all required secrets are set
97
+
98
+ ## Future Improvements
99
+
100
+ Consider adding:
101
+
102
+ - [ ] Automated testing on pull requests
103
+ - [ ] Security scanning with CodeQL
104
+ - [ ] Dependency vulnerability scanning
105
+ - [ ] Automated changelog generation
106
+ - [ ] Release notes automation
107
+ - [ ] Performance testing
108
+ - [ ] Coverage reporting
@@ -10,6 +10,7 @@ on:
10
10
  # Add permissions block
11
11
  permissions:
12
12
  contents: write
13
+ packages: write
13
14
 
14
15
  jobs:
15
16
  checkout:
@@ -93,18 +94,31 @@ jobs:
93
94
  git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
94
95
  python -m build
95
96
  twine upload dist/* --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
97
+ env:
98
+ PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
96
99
  release:
97
100
  needs: publish
98
101
  runs-on: ubuntu-latest
99
102
  steps:
100
103
  - name: Checkout repository
101
104
  uses: actions/checkout@v4
105
+ with:
106
+ fetch-depth: 0
107
+ token: ${{ secrets.GITHUB_TOKEN }}
108
+
109
+ - name: Configure Git
110
+ run: |
111
+ git config --global user.name "github-actions[bot]"
112
+ git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
113
+
102
114
  - name: Setup Node.js
103
115
  uses: actions/setup-node@v4
104
116
  with:
105
117
  node-version: "18.x"
118
+
106
119
  - name: Install npm dependencies
107
120
  run: npm install
121
+
108
122
  - name: Run release script
109
123
  env:
110
124
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blizzardapi2
3
- Version: 2.1.7
3
+ Version: 2.1.9
4
4
  Summary: A Python wrapper for Blizzard API
5
5
  Author-email: lostcol0ny <c098os0k@4wrd.cc>
6
6
  License-Expression: MIT
@@ -79,7 +79,7 @@ Python (3.11+)
79
79
 
80
80
  ```python
81
81
  from blizzardapi2 import BlizzardApi
82
- from blizzardapi2.wow.wow_profile_api import Region, Locale
82
+ from blizzardapi2.types import Locale, Region
83
83
 
84
84
  api_client = BlizzardApi("client_id", "client_secret")
85
85
 
@@ -109,7 +109,7 @@ connected_realms_index = api_client.wow.game_data.get_connected_realms_index(
109
109
  ```python
110
110
  import asyncio
111
111
  from blizzardapi2 import BlizzardApi
112
- from blizzardapi2.wow.wow_profile_api import Region, Locale
112
+ from blizzardapi2.types import Locale, Region
113
113
 
114
114
  async def main():
115
115
  api_client = BlizzardApi("client_id", "client_secret")
@@ -50,7 +50,7 @@ Python (3.11+)
50
50
 
51
51
  ```python
52
52
  from blizzardapi2 import BlizzardApi
53
- from blizzardapi2.wow.wow_profile_api import Region, Locale
53
+ from blizzardapi2.types import Locale, Region
54
54
 
55
55
  api_client = BlizzardApi("client_id", "client_secret")
56
56
 
@@ -80,7 +80,7 @@ connected_realms_index = api_client.wow.game_data.get_connected_realms_index(
80
80
  ```python
81
81
  import asyncio
82
82
  from blizzardapi2 import BlizzardApi
83
- from blizzardapi2.wow.wow_profile_api import Region, Locale
83
+ from blizzardapi2.types import Locale, Region
84
84
 
85
85
  async def main():
86
86
  api_client = BlizzardApi("client_id", "client_secret")
@@ -0,0 +1,34 @@
1
+ # file generated by setuptools-scm
2
+ # don't change, don't track in version control
3
+
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
12
+
13
+ TYPE_CHECKING = False
14
+ if TYPE_CHECKING:
15
+ from typing import Tuple
16
+ from typing import Union
17
+
18
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
20
+ else:
21
+ VERSION_TUPLE = object
22
+ COMMIT_ID = object
23
+
24
+ version: str
25
+ __version__: str
26
+ __version_tuple__: VERSION_TUPLE
27
+ version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
30
+
31
+ __version__ = version = '2.0.8.dev25+g37755c701'
32
+ __version_tuple__ = version_tuple = (2, 0, 8, 'dev25', 'g37755c701')
33
+
34
+ __commit_id__ = commit_id = 'g37755c701'
@@ -6,7 +6,7 @@ from typing import Any
6
6
  import requests
7
7
 
8
8
 
9
- class Api:
9
+ class BaseApi:
10
10
  """Base API class.
11
11
 
12
12
  Attributes:
@@ -2,7 +2,7 @@
2
2
 
3
3
  from typing import Any
4
4
 
5
- from .battlenet_oauth_api import BattlenetOauthApi
5
+ from .battlenet_oauth_api import BattlenetOAuthApi
6
6
 
7
7
 
8
8
  class BattlenetApi:
@@ -15,4 +15,4 @@ class BattlenetApi:
15
15
 
16
16
  def __init__(self, client_id: str, client_secret: str) -> dict[str, Any]:
17
17
  """Init BattlenetApi."""
18
- self.oauth = BattlenetOauthApi(client_id, client_secret)
18
+ self.oauth = BattlenetOAuthApi(client_id, client_secret)
@@ -6,8 +6,8 @@ including user information and authentication.
6
6
 
7
7
  from typing import Any, Dict
8
8
 
9
- from ..api import BaseApi, Locale, Region
10
-
9
+ from ..api import BaseApi
10
+ from ..types import Locale, Region
11
11
 
12
12
  class ApiResponse:
13
13
  """Wrapper for API responses with metadata."""
@@ -1,11 +1,11 @@
1
1
  from typing import Any
2
2
 
3
- from ..api import Api
3
+ from ..api import BaseApi
4
4
 
5
5
  """diablo3_community_api.py file."""
6
6
 
7
7
 
8
- class Diablo3CommunityApi(Api):
8
+ class Diablo3CommunityApi(BaseApi):
9
9
  """All Diablo 3 Community API methods.
10
10
 
11
11
  Attributes:
@@ -1,9 +1,9 @@
1
- from ..api import Api
1
+ from ..api import BaseApi
2
2
 
3
3
  """diablo3_game_data_api.py file."""
4
4
 
5
5
 
6
- class Diablo3GameDataApi(Api):
6
+ class Diablo3GameDataApi(BaseApi):
7
7
  """All Diablo 3 Game Data API methods.
8
8
 
9
9
  Attributes:
@@ -6,8 +6,8 @@ including cards, card backs, and metadata.
6
6
 
7
7
  from typing import Any, Dict
8
8
 
9
- from ..api import BaseApi, Locale, Region
10
-
9
+ from ..api import BaseApi
10
+ from ..types import Locale, Region
11
11
 
12
12
  class ApiResponse:
13
13
  """Wrapper for API responses with metadata."""
@@ -1,11 +1,11 @@
1
1
  from typing import Any
2
2
 
3
- from ..api import Api
3
+ from ..api import BaseApi
4
4
 
5
5
  """hearthstone_game_data_api.py file."""
6
6
 
7
7
 
8
- class HearthstoneGameDataApi(Api):
8
+ class HearthstoneGameDataApi(BaseApi):
9
9
  """All Hearthstone Game Data API methods.
10
10
 
11
11
  Attributes:
@@ -2,10 +2,10 @@
2
2
 
3
3
  from typing import Any
4
4
 
5
- from ..api import Api
5
+ from ..api import BaseApi
6
6
 
7
7
 
8
- class Starcraft2CommunityApi(Api):
8
+ class Starcraft2CommunityApi(BaseApi):
9
9
  """All Starcraft 2 Community API methods.
10
10
 
11
11
  Attributes:
@@ -2,10 +2,10 @@
2
2
 
3
3
  from typing import Any
4
4
 
5
- from ..api import Api
5
+ from ..api import BaseApi
6
6
 
7
7
 
8
- class Starcraft2GameDataApi(Api):
8
+ class Starcraft2GameDataApi(BaseApi):
9
9
  """Starcraft2 Game Data API class.
10
10
 
11
11
  Attributes:
@@ -2,10 +2,10 @@
2
2
 
3
3
  from typing import Any
4
4
 
5
- from ..api import Api
5
+ from ..api import BaseApi
6
6
 
7
7
 
8
- class WowGameDataApi(Api):
8
+ class WowGameDataApi(BaseApi):
9
9
  """All Wow Game Data API methods.
10
10
 
11
11
  Attributes:
@@ -2,10 +2,10 @@
2
2
 
3
3
  from typing import Any
4
4
 
5
- from ..api import Api
5
+ from ..api import BaseApi
6
6
 
7
7
 
8
- class WowProfileApi(Api):
8
+ class WowProfileApi(BaseApi):
9
9
  """All Wow Profile API methods.
10
10
 
11
11
  Attributes:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blizzardapi2
3
- Version: 2.1.7
3
+ Version: 2.1.9
4
4
  Summary: A Python wrapper for Blizzard API
5
5
  Author-email: lostcol0ny <c098os0k@4wrd.cc>
6
6
  License-Expression: MIT
@@ -79,7 +79,7 @@ Python (3.11+)
79
79
 
80
80
  ```python
81
81
  from blizzardapi2 import BlizzardApi
82
- from blizzardapi2.wow.wow_profile_api import Region, Locale
82
+ from blizzardapi2.types import Locale, Region
83
83
 
84
84
  api_client = BlizzardApi("client_id", "client_secret")
85
85
 
@@ -109,7 +109,7 @@ connected_realms_index = api_client.wow.game_data.get_connected_realms_index(
109
109
  ```python
110
110
  import asyncio
111
111
  from blizzardapi2 import BlizzardApi
112
- from blizzardapi2.wow.wow_profile_api import Region, Locale
112
+ from blizzardapi2.types import Locale, Region
113
113
 
114
114
  async def main():
115
115
  api_client = BlizzardApi("client_id", "client_secret")
@@ -11,6 +11,7 @@ uv.lock
11
11
  .github/dependabot.yml
12
12
  .github/ISSUE_TEMPLATE/bug_report.md
13
13
  .github/ISSUE_TEMPLATE/feature_request.md
14
+ .github/workflows/README.md
14
15
  .github/workflows/black.yml
15
16
  .github/workflows/python-package.yml
16
17
  blizzardapi2/__init__.py
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blizzardapi2",
3
- "version": "2.1.7",
3
+ "version": "2.1.9",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "release": "release-it"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "blizzardapi2"
3
- version = "2.1.7"
3
+ version = "2.1.9"
4
4
  description = "A Python wrapper for Blizzard API"
5
5
  authors = [{ name = "lostcol0ny", email = "c098os0k@4wrd.cc" }]
6
6
  license = "MIT"
@@ -1,21 +0,0 @@
1
- # file generated by setuptools-scm
2
- # don't change, don't track in version control
3
-
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5
-
6
- TYPE_CHECKING = False
7
- if TYPE_CHECKING:
8
- from typing import Tuple
9
- from typing import Union
10
-
11
- VERSION_TUPLE = Tuple[Union[int, str], ...]
12
- else:
13
- VERSION_TUPLE = object
14
-
15
- version: str
16
- __version__: str
17
- __version_tuple__: VERSION_TUPLE
18
- version_tuple: VERSION_TUPLE
19
-
20
- __version__ = version = '2.0.8.dev18+g7ef899e'
21
- __version_tuple__ = version_tuple = (2, 0, 8, 'dev18', 'g7ef899e')
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes