blizzardapi2 1.1.1__tar.gz → 1.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.
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/PKG-INFO +1 -1
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/api.py +2 -2
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/hearthstone/hearthstone_game_data_api.py +7 -1
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/wow/wow_profile_api.py +1 -1
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/pyproject.toml +1 -1
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/LICENSE +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/README.md +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/__init__.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/battlenet/__init__.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/battlenet/battlenet_api.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/battlenet/battlenet_oauth_api.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/blizzard_api.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/diablo3/__init__.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/diablo3/diablo3_api.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/diablo3/diablo3_community_api.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/diablo3/diablo3_game_data_api.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/hearthstone/__init__.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/hearthstone/hearthstone_api.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/starcraft2/__init__.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/starcraft2/starcraft2_api.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/starcraft2/starcraft2_community_api.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/starcraft2/starcraft2_game_data_api.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/wow/__init__.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/wow/wow_api.py +0 -0
- {blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/wow/wow_game_data_api.py +0 -0
|
@@ -30,8 +30,8 @@ class Api:
|
|
|
30
30
|
self._api_url = "https://{0}.api.blizzard.com{1}"
|
|
31
31
|
self._api_url_cn = "https://gateway.battlenet.com.cn{0}"
|
|
32
32
|
|
|
33
|
-
self._oauth_url = "https://
|
|
34
|
-
self._oauth_url_cn = "https://www.battlenet.com.cn{0}"
|
|
33
|
+
self._oauth_url = "https://oauth.battle.net{1}"
|
|
34
|
+
self._oauth_url_cn = "https://www.gateway.battlenet.com.cn{0}"
|
|
35
35
|
|
|
36
36
|
self._session = requests.Session()
|
|
37
37
|
|
{blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/hearthstone/hearthstone_game_data_api.py
RENAMED
|
@@ -23,7 +23,7 @@ class HearthstoneGameDataApi(Api):
|
|
|
23
23
|
super().__init__(client_id, client_secret)
|
|
24
24
|
|
|
25
25
|
def search_cards(
|
|
26
|
-
self, region: str, locale: str, **query_params: Any
|
|
26
|
+
self, region: str, locale: str, card_class: str = None, **query_params: Any
|
|
27
27
|
) -> Dict[str, Any]:
|
|
28
28
|
"""
|
|
29
29
|
Return an up-to-date list of all cards matching the search criteria.
|
|
@@ -31,6 +31,7 @@ class HearthstoneGameDataApi(Api):
|
|
|
31
31
|
Args:
|
|
32
32
|
region (str): The region to query (e.g., "us", "eu").
|
|
33
33
|
locale (str): The locale to use for the response.
|
|
34
|
+
card_class (str, optional): The card class (e.g., "mage", "warrior").
|
|
34
35
|
**query_params (Any): Additional search parameters.
|
|
35
36
|
|
|
36
37
|
Returns:
|
|
@@ -38,6 +39,11 @@ class HearthstoneGameDataApi(Api):
|
|
|
38
39
|
"""
|
|
39
40
|
resource = "/hearthstone/cards"
|
|
40
41
|
query_params.update({"locale": locale})
|
|
42
|
+
|
|
43
|
+
# Map `card_class` to `class` if provided
|
|
44
|
+
if card_class is not None:
|
|
45
|
+
query_params["class"] = card_class
|
|
46
|
+
|
|
41
47
|
return super().get_resource(resource, region, query_params)
|
|
42
48
|
|
|
43
49
|
def get_card(
|
|
@@ -42,7 +42,7 @@ class WowProfileApi(Api):
|
|
|
42
42
|
"locale": locale,
|
|
43
43
|
"access_token": access_token,
|
|
44
44
|
}
|
|
45
|
-
return super().
|
|
45
|
+
return super().get_oauth_resource(resource, region, query_params)
|
|
46
46
|
|
|
47
47
|
def get_protected_character_profile_summary(
|
|
48
48
|
self,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/starcraft2/starcraft2_community_api.py
RENAMED
|
File without changes
|
{blizzardapi2-1.1.1 → blizzardapi2-1.1.3}/blizzardapi2/starcraft2/starcraft2_game_data_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|