blizzardapi2 1.1.3__tar.gz → 2.1.1__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 (64) hide show
  1. blizzardapi2-2.1.1/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  2. blizzardapi2-2.1.1/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  3. blizzardapi2-2.1.1/.github/dependabot.yml +12 -0
  4. blizzardapi2-2.1.1/.github/workflows/python-package.yml +83 -0
  5. blizzardapi2-2.1.1/.gitignore +141 -0
  6. blizzardapi2-2.1.1/CODE_OF_CONDUCT.md +128 -0
  7. blizzardapi2-2.1.1/CONTRIBUTING.md +14 -0
  8. {blizzardapi2-1.1.3 → blizzardapi2-2.1.1}/LICENSE +21 -21
  9. blizzardapi2-2.1.1/PKG-INFO +156 -0
  10. blizzardapi2-1.1.3/PKG-INFO → blizzardapi2-2.1.1/README.md +75 -27
  11. blizzardapi2-2.1.1/SECURITY.md +19 -0
  12. {blizzardapi2-1.1.3 → blizzardapi2-2.1.1}/blizzardapi2/__init__.py +5 -5
  13. blizzardapi2-2.1.1/blizzardapi2/_version.py +21 -0
  14. blizzardapi2-2.1.1/blizzardapi2/api.py +465 -0
  15. {blizzardapi2-1.1.3 → blizzardapi2-2.1.1}/blizzardapi2/battlenet/__init__.py +1 -1
  16. blizzardapi2-2.1.1/blizzardapi2/battlenet/battlenet_api.py +32 -0
  17. blizzardapi2-2.1.1/blizzardapi2/battlenet/battlenet_oauth_api.py +59 -0
  18. blizzardapi2-2.1.1/blizzardapi2/blizzard_api.py +98 -0
  19. {blizzardapi2-1.1.3 → blizzardapi2-2.1.1}/blizzardapi2/diablo3/__init__.py +1 -1
  20. blizzardapi2-2.1.1/blizzardapi2/diablo3/diablo3_api.py +36 -0
  21. blizzardapi2-2.1.1/blizzardapi2/diablo3/diablo3_community_api.py +697 -0
  22. blizzardapi2-2.1.1/blizzardapi2/diablo3/diablo3_game_data_api.py +140 -0
  23. {blizzardapi2-1.1.3 → blizzardapi2-2.1.1}/blizzardapi2/hearthstone/__init__.py +1 -1
  24. blizzardapi2-2.1.1/blizzardapi2/hearthstone/hearthstone_api.py +190 -0
  25. blizzardapi2-2.1.1/blizzardapi2/hearthstone/hearthstone_game_data_api.py +176 -0
  26. {blizzardapi2-1.1.3 → blizzardapi2-2.1.1}/blizzardapi2/starcraft2/__init__.py +1 -1
  27. blizzardapi2-2.1.1/blizzardapi2/starcraft2/starcraft2_api.py +197 -0
  28. blizzardapi2-2.1.1/blizzardapi2/starcraft2/starcraft2_community_api.py +440 -0
  29. blizzardapi2-2.1.1/blizzardapi2/starcraft2/starcraft2_game_data_api.py +83 -0
  30. blizzardapi2-2.1.1/blizzardapi2/types.py +26 -0
  31. blizzardapi2-2.1.1/blizzardapi2/wow/__init__.py +1 -0
  32. blizzardapi2-2.1.1/blizzardapi2/wow/wow_api.py +35 -0
  33. {blizzardapi2-1.1.3 → blizzardapi2-2.1.1}/blizzardapi2/wow/wow_game_data_api.py +2622 -2513
  34. {blizzardapi2-1.1.3 → blizzardapi2-2.1.1}/blizzardapi2/wow/wow_profile_api.py +900 -861
  35. blizzardapi2-2.1.1/blizzardapi2.egg-info/PKG-INFO +156 -0
  36. blizzardapi2-2.1.1/blizzardapi2.egg-info/SOURCES.txt +46 -0
  37. blizzardapi2-2.1.1/blizzardapi2.egg-info/dependency_links.txt +1 -0
  38. blizzardapi2-2.1.1/blizzardapi2.egg-info/requires.txt +14 -0
  39. blizzardapi2-2.1.1/blizzardapi2.egg-info/top_level.txt +1 -0
  40. blizzardapi2-2.1.1/docs/battlenet/README.md +96 -0
  41. blizzardapi2-2.1.1/docs/diablo3/README.md +88 -0
  42. blizzardapi2-2.1.1/docs/hearthstone/README.md +88 -0
  43. blizzardapi2-2.1.1/docs/pull_request_template.md +3 -0
  44. blizzardapi2-2.1.1/docs/starcraft2/README.md +156 -0
  45. blizzardapi2-2.1.1/docs/wow/README.md +146 -0
  46. blizzardapi2-2.1.1/pyproject.toml +110 -0
  47. blizzardapi2-2.1.1/setup.cfg +4 -0
  48. blizzardapi2-2.1.1/uv.lock +798 -0
  49. blizzardapi2-1.1.3/README.md +0 -65
  50. blizzardapi2-1.1.3/blizzardapi2/api.py +0 -147
  51. blizzardapi2-1.1.3/blizzardapi2/battlenet/battlenet_api.py +0 -17
  52. blizzardapi2-1.1.3/blizzardapi2/battlenet/battlenet_oauth_api.py +0 -39
  53. blizzardapi2-1.1.3/blizzardapi2/blizzard_api.py +0 -24
  54. blizzardapi2-1.1.3/blizzardapi2/diablo3/diablo3_api.py +0 -18
  55. blizzardapi2-1.1.3/blizzardapi2/diablo3/diablo3_community_api.py +0 -270
  56. blizzardapi2-1.1.3/blizzardapi2/diablo3/diablo3_game_data_api.py +0 -111
  57. blizzardapi2-1.1.3/blizzardapi2/hearthstone/hearthstone_api.py +0 -16
  58. blizzardapi2-1.1.3/blizzardapi2/hearthstone/hearthstone_game_data_api.py +0 -151
  59. blizzardapi2-1.1.3/blizzardapi2/starcraft2/starcraft2_api.py +0 -22
  60. blizzardapi2-1.1.3/blizzardapi2/starcraft2/starcraft2_community_api.py +0 -187
  61. blizzardapi2-1.1.3/blizzardapi2/starcraft2/starcraft2_game_data_api.py +0 -42
  62. blizzardapi2-1.1.3/blizzardapi2/wow/__init__.py +0 -1
  63. blizzardapi2-1.1.3/blizzardapi2/wow/wow_api.py +0 -18
  64. blizzardapi2-1.1.3/pyproject.toml +0 -19
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **Screenshots**
24
+ If applicable, add screenshots to help explain your problem.
25
+
26
+ **Desktop (please complete the following information):**
27
+ - OS: [e.g. iOS]
28
+ - Browser [e.g. chrome, safari]
29
+ - Version [e.g. 22]
30
+
31
+ **Smartphone (please complete the following information):**
32
+ - Device: [e.g. iPhone6]
33
+ - OS: [e.g. iOS8.1]
34
+ - Browser [e.g. stock browser, safari]
35
+ - Version [e.g. 22]
36
+
37
+ **Additional context**
38
+ Add any other context about the problem here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,12 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "pip"
4
+ directories:
5
+ - "/"
6
+ schedule:
7
+ interval: "daily"
8
+ groups:
9
+ production-dependencies:
10
+ applies-to: version-updates
11
+ patterns:
12
+ - "*"
@@ -0,0 +1,83 @@
1
+ # This workflow will install Python dependencies, run tests, lint, and publish beta releases
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
+
4
+ name: Python package
5
+
6
+ on:
7
+ push:
8
+ branches: ["main"]
9
+ pull_request:
10
+ branches: ["main"]
11
+
12
+ jobs:
13
+ test:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python-version: ["3.11", "3.12", "3.13"]
19
+
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ with:
23
+ fetch-depth: 0 # Fetch all history for setuptools_scm
24
+
25
+ - name: Set up Python ${{ matrix.python-version }}
26
+ uses: actions/setup-python@v5
27
+ with:
28
+ python-version: ${{ matrix.python-version }}
29
+
30
+ - name: Install uv
31
+ run: |
32
+ curl -LsSf https://astral.sh/uv/install.sh | sh
33
+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
34
+
35
+ - name: Create virtual environment
36
+ run: |
37
+ uv venv
38
+
39
+ - name: Install dependencies
40
+ run: |
41
+ uv pip install -e ".[dev]"
42
+
43
+ publish:
44
+ needs: test
45
+ if: github.ref == 'refs/heads/main'
46
+ runs-on: ubuntu-latest
47
+ steps:
48
+ - uses: actions/checkout@v4
49
+ with:
50
+ fetch-depth: 0
51
+
52
+ - name: Set up Python
53
+ uses: actions/setup-python@v5
54
+ with:
55
+ python-version: "3.11"
56
+
57
+ - name: Install uv
58
+ run: |
59
+ curl -LsSf https://astral.sh/uv/install.sh | sh
60
+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
61
+
62
+ - name: Create virtual environment
63
+ run: |
64
+ uv venv
65
+
66
+ - name: Install dependencies
67
+ run: |
68
+ uv pip install -e ".[dev]"
69
+
70
+ - name: Build and publish to PyPI
71
+ run: |
72
+ python -m pip install --upgrade pip
73
+ pip install build twine setuptools_scm
74
+ # Get the current version from pyproject.toml
75
+ CURRENT_VERSION=$(grep 'version = ' pyproject.toml | cut -d'"' -f2)
76
+ # Split version into major.minor.patch
77
+ IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION"
78
+ # Increment minor version
79
+ NEW_VERSION="$MAJOR.$((MINOR + 1)).$PATCH"
80
+ # Update version in pyproject.toml
81
+ sed -i "s/version = \".*\"/version = \"$NEW_VERSION\"/" pyproject.toml
82
+ python -m build
83
+ twine upload dist/* --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,141 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
130
+
131
+ # Other
132
+ .DS_Store
133
+
134
+ # VSCode
135
+ .vscode
136
+
137
+ # Test project
138
+ test_project/
139
+
140
+ # Version file
141
+ blizzardapi2/_version.py
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ c098os0k@4wrd.cc.
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
@@ -0,0 +1,14 @@
1
+ # How To Contribute
2
+ ## Features
3
+ If Blizzard adds a new API endpoint and you get to it before I do, feel free to open a PR. There are a few things I ask if you contribute:
4
+ <ul>Follow the conventions already in the code -- keep everything uniform.</ul>
5
+ <ul>If you write an API endpoint function, write its accompanying test in the proper file.</ul>
6
+ <ul>black is the preferred formatting system for this project</ul>
7
+
8
+ ## Bugs
9
+ I'm a hobbyist with Python so there's a decent chance I'll make a mistake. I run PyTest against every function I write, but that won't catch everything.
10
+ When you submit a PR that fixes a bug, be clear about what the bug is and how your changes fix it.
11
+ Follow the same guidelines as you would if you were submitting a feature.
12
+
13
+ ## Contact
14
+ Feel free to contact me with any questions/comments. You can email me at c098os0k@4wrd.cc or find me on Discord.
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 Trevor Phillips
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Trevor Phillips
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,156 @@
1
+ Metadata-Version: 2.4
2
+ Name: blizzardapi2
3
+ Version: 2.1.1
4
+ Summary: A Python wrapper for Blizzard API
5
+ Author-email: lostcol0ny <c098os0k@4wrd.cc>
6
+ License: MIT
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: requests<3.0.0,>=2.32.3
11
+ Requires-Dist: black<25.0.0,>=24.4.2
12
+ Requires-Dist: pytest<9.0.0,>=8.2.2
13
+ Requires-Dist: pytest-mock<4.0.0,>=3.14.0
14
+ Requires-Dist: ruff<1.0.0,>=0.3.0
15
+ Requires-Dist: pydantic>=2.11.6
16
+ Requires-Dist: aiohttp>=3.12.12
17
+ Provides-Extra: dev
18
+ Requires-Dist: pytest<9.0.0,>=8.2.2; extra == "dev"
19
+ Requires-Dist: pytest-mock<4.0.0,>=3.14.0; extra == "dev"
20
+ Requires-Dist: pytest-asyncio<1.0.0,>=0.23.5; extra == "dev"
21
+ Requires-Dist: black<25.0.0,>=24.4.2; extra == "dev"
22
+ Requires-Dist: ruff<1.0.0,>=0.3.0; extra == "dev"
23
+ Dynamic: license-file
24
+
25
+ # blizzardapi2
26
+
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)
28
+
29
+ blizzardapi2 is a client library for Blizzard's APIs. It's a fork of [the original library](https://github.com/trevorphillipscoding/python-blizzardapi/).
30
+
31
+ Current supported features include:
32
+
33
+ - Battle.net User
34
+ - WoW Profile
35
+ - WoW Game Data
36
+ - WoW Classic Game Data
37
+ - Diablo 3 Community
38
+ - Diablo 3 Game Data
39
+ - Hearthstone Game Data
40
+ - Starcraft 2 Community
41
+ - Starcraft 2 Game Data
42
+
43
+ Modern features:
44
+
45
+ - Full type hints support
46
+ - Async/await support for better performance
47
+ - Enum-based region and locale validation
48
+ - Structured response types using dataclasses
49
+ - Improved error handling and logging
50
+
51
+ To gain access to Blizzard's API please register [here](https://develop.battle.net/access/) to obtain a client id and client secret.
52
+
53
+ For more information on Blizzard's API visit:
54
+
55
+ [Official Documentation](https://develop.battle.net/documentation)
56
+ [Official API Forum](https://us.forums.blizzard.com/en/blizzard/c/api-discussion)
57
+
58
+ # Requirements
59
+
60
+ Python (3.11+)
61
+
62
+ # Installing
63
+
64
+ `pip install blizzardapi2`
65
+
66
+ # Examples
67
+
68
+ **Basic Usage**
69
+
70
+ ```python
71
+ from blizzardapi2 import BlizzardApi
72
+ from blizzardapi2.wow.wow_profile_api import Region, Locale
73
+
74
+ api_client = BlizzardApi("client_id", "client_secret")
75
+
76
+ # Unprotected API endpoint
77
+ categories_index = api_client.wow.game_data.get_achievement_categories_index(
78
+ Region.US,
79
+ Locale.EN_US
80
+ )
81
+
82
+ # Protected API endpoint
83
+ summary = api_client.wow.profile.get_account_profile_summary(
84
+ Region.US,
85
+ Locale.EN_US,
86
+ "access_token"
87
+ )
88
+
89
+ # Wow Classic endpoint
90
+ connected_realms_index = api_client.wow.game_data.get_connected_realms_index(
91
+ Region.US,
92
+ Locale.EN_US,
93
+ is_classic=True
94
+ )
95
+ ```
96
+
97
+ **Async Usage**
98
+
99
+ ```python
100
+ import asyncio
101
+ from blizzardapi2 import BlizzardApi
102
+ from blizzardapi2.wow.wow_profile_api import Region, Locale
103
+
104
+ async def main():
105
+ api_client = BlizzardApi("client_id", "client_secret")
106
+
107
+ # Async API calls
108
+ profile = await api_client.wow.profile.get_account_profile_summary(
109
+ Region.US,
110
+ Locale.EN_US,
111
+ "access_token"
112
+ )
113
+
114
+ # Multiple concurrent requests
115
+ tasks = [
116
+ api_client.wow.profile.get_character_profile_summary(
117
+ Region.US,
118
+ Locale.EN_US,
119
+ "realm-slug",
120
+ "character-name"
121
+ ),
122
+ api_client.wow.profile.get_character_achievements_summary(
123
+ Region.US,
124
+ Locale.EN_US,
125
+ "realm-slug",
126
+ "character-name"
127
+ )
128
+ ]
129
+ results = await asyncio.gather(*tasks)
130
+
131
+ asyncio.run(main())
132
+ ```
133
+
134
+ # Access token vs Client ID/Client Secret
135
+
136
+ 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.
137
+
138
+ Here is the list of endpoints, specified by Blizzard, that require an OAuth token:
139
+
140
+ ```
141
+ GET /oauth/userinfo
142
+ GET /profile/user/wow
143
+ GET /profile/user/wow/protected-character/{realm-id}-{character-id}
144
+ GET /profile/user/wow/collections
145
+ GET /profile/user/wow/collections/pets
146
+ GET /profile/user/wow/collections/mounts
147
+ ```
148
+
149
+ # Documentation
150
+
151
+ For detailed documentation on each game's API, see the following README files:
152
+
153
+ - [WoW API Documentation](docs/wow/README.md)
154
+ - [Diablo 3 API Documentation](docs/diablo3/README.md)
155
+ - [Hearthstone API Documentation](docs/hearthstone/README.md)
156
+ - [Starcraft 2 API Documentation](docs/starcraft2/README.md)