blizzardapi2 0.1.2__tar.gz → 0.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-0.1.2 → blizzardapi2-0.1.3}/PKG-INFO +9 -7
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/README.md +8 -6
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/wow/wow_game_data_api.py +153 -41
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/wow/wow_profile_api.py +51 -2
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/pyproject.toml +1 -1
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/LICENSE +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/__init__.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/api.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/battlenet/__init__.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/battlenet/battlenet_api.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/battlenet/battlenet_oauth_api.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/blizzard_api.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/diablo3/__init__.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/diablo3/diablo3_api.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/diablo3/diablo3_community_api.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/diablo3/diablo3_game_data_api.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/hearthstone/__init__.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/hearthstone/hearthstone_api.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/hearthstone/hearthstone_game_data_api.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/starcraft2/__init__.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/starcraft2/starcraft2_api.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/starcraft2/starcraft2_community_api.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/starcraft2/starcraft2_game_data_api.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/wow/__init__.py +0 -0
- {blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/wow/wow_api.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: blizzardapi2
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: A Python wrapper for Blizzard API
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Your Name
|
|
@@ -19,18 +19,20 @@ Description-Content-Type: text/markdown
|
|
|
19
19
|
# blizzardapi2
|
|
20
20
|
[](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/python-package.yml)[](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/dependabot/dependabot-updates)[](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/github-code-scanning/codeql)
|
|
21
21
|
|
|
22
|
-
blizzardapi2 is a client library for Blizzard's APIs. It's a fork of [the original library](https://github.com/trevorphillipscoding/python-blizzardapi/)
|
|
23
|
-
|
|
24
|
-
It currently has the exact same functionality as the original version, but with updated dependencies. As I go through Blizzard's API categories, I'll update the library as necessary.
|
|
22
|
+
blizzardapi2 is a client library for Blizzard's APIs. It's a fork of [the original library](https://github.com/trevorphillipscoding/python-blizzardapi/).
|
|
25
23
|
|
|
26
24
|
Current supported features include:
|
|
27
25
|
- Battle.net User
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
26
|
+
- WoW Profile
|
|
27
|
+
- WoW Game Data
|
|
28
|
+
- WoW Classic Game Data
|
|
31
29
|
- Diablo 3 Community
|
|
32
30
|
- Diablo 3 Game Data
|
|
33
31
|
- Hearthstone Game Data
|
|
32
|
+
- Starcraft 2 Community
|
|
33
|
+
- Starcraft 2 Game Data
|
|
34
|
+
|
|
35
|
+
Type hints have been added as well.
|
|
34
36
|
|
|
35
37
|
To gain access to Blizzard's API please register [here](https://develop.battle.net/access/) to obtain a client id and client secret.
|
|
36
38
|
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
# blizzardapi2
|
|
2
2
|
[](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/python-package.yml)[](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/dependabot/dependabot-updates)[](https://github.com/lostcol0ny/python-blizzardapi2/actions/workflows/github-code-scanning/codeql)
|
|
3
3
|
|
|
4
|
-
blizzardapi2 is a client library for Blizzard's APIs. It's a fork of [the original library](https://github.com/trevorphillipscoding/python-blizzardapi/)
|
|
5
|
-
|
|
6
|
-
It currently has the exact same functionality as the original version, but with updated dependencies. As I go through Blizzard's API categories, I'll update the library as necessary.
|
|
4
|
+
blizzardapi2 is a client library for Blizzard's APIs. It's a fork of [the original library](https://github.com/trevorphillipscoding/python-blizzardapi/).
|
|
7
5
|
|
|
8
6
|
Current supported features include:
|
|
9
7
|
- Battle.net User
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
8
|
+
- WoW Profile
|
|
9
|
+
- WoW Game Data
|
|
10
|
+
- WoW Classic Game Data
|
|
13
11
|
- Diablo 3 Community
|
|
14
12
|
- Diablo 3 Game Data
|
|
15
13
|
- Hearthstone Game Data
|
|
14
|
+
- Starcraft 2 Community
|
|
15
|
+
- Starcraft 2 Game Data
|
|
16
|
+
|
|
17
|
+
Type hints have been added as well.
|
|
16
18
|
|
|
17
19
|
To gain access to Blizzard's API please register [here](https://develop.battle.net/access/) to obtain a client id and client secret.
|
|
18
20
|
|
|
@@ -72,6 +72,14 @@ class WowGameDataApi(Api):
|
|
|
72
72
|
resource = f"/data/wow/connected-realm/{connected_realm_id}/auctions"
|
|
73
73
|
query_params = {"namespace": f"dynamic-{region}", "locale": locale}
|
|
74
74
|
return super().get_resource(resource, region, query_params)
|
|
75
|
+
|
|
76
|
+
def get_commodities(self, region: str, locale: str) -> Dict[str, Any]:
|
|
77
|
+
"""Returns all active auctions for commodity items for the entire game region.
|
|
78
|
+
Auction house data updates at a set interval. The value was initially set at 1 hour; however, it might change over time without notice.
|
|
79
|
+
Depending on the number of active auctions on the specified connected realm, the response from this endpoint may be rather large, sometimes exceeding 10 MB."""
|
|
80
|
+
resource = f"/data/wow/auctions/commodities"
|
|
81
|
+
query_params = {"namespace": f"dynamic-{region}", "locale": locale}
|
|
82
|
+
return super().get_resource(resource, region, query_params)
|
|
75
83
|
|
|
76
84
|
# Azerite Essence API
|
|
77
85
|
|
|
@@ -108,6 +116,50 @@ class WowGameDataApi(Api):
|
|
|
108
116
|
namespace = f"dynamic-classic-{region}" if is_classic else f"dynamic-{region}"
|
|
109
117
|
query_params = {"namespace": namespace, "locale": locale}
|
|
110
118
|
return super().get_resource(resource, region, query_params)
|
|
119
|
+
|
|
120
|
+
# Covenant API
|
|
121
|
+
|
|
122
|
+
def get_covenant_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
123
|
+
"""Return an index of covenants."""
|
|
124
|
+
resource = "/data/wow/covenant/index"
|
|
125
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
126
|
+
return super().get_resource(resource, region, query_params)
|
|
127
|
+
|
|
128
|
+
def get_covenant(self, region: str, locale: str, covenant_id: int) -> Dict[str, Any]:
|
|
129
|
+
"""Return a covenant by ID."""
|
|
130
|
+
resource = f"/data/wow/covenant/{covenant_id}"
|
|
131
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
132
|
+
return super().get_resource(resource, region, query_params)
|
|
133
|
+
|
|
134
|
+
def get_covenant_media(self, region: str, locale: str, covenant_id: int) -> Dict[str, Any]:
|
|
135
|
+
"""Return media for a covenant by ID."""
|
|
136
|
+
resource = f"/data/wow/media/covenant/{covenant_id}"
|
|
137
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
138
|
+
return super().get_resource(resource, region, query_params)
|
|
139
|
+
|
|
140
|
+
def get_soulbind_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
141
|
+
"""Return an index of soulbinds."""
|
|
142
|
+
resource = "/data/wow/covenant/soulbind/index"
|
|
143
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
144
|
+
return super().get_resource(resource, region, query_params)
|
|
145
|
+
|
|
146
|
+
def get_soulbind(self, region: str, locale: str, soulbind_id: int) -> Dict[str, Any]:
|
|
147
|
+
"""Return a soulbind by ID."""
|
|
148
|
+
resource = f"/data/wow/covenant/soulbind/{soulbind_id}"
|
|
149
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
150
|
+
return super().get_resource(resource, region, query_params)
|
|
151
|
+
|
|
152
|
+
def get_conduit_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
153
|
+
"""Return an index of conduits."""
|
|
154
|
+
resource = "/data/wow/covenant/conduit/index"
|
|
155
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
156
|
+
return super().get_resource(resource, region, query_params)
|
|
157
|
+
|
|
158
|
+
def get_conduit(self, region: str, locale: str, conduit_id: int) -> Dict[str, Any]:
|
|
159
|
+
"""Return a conduit by ID."""
|
|
160
|
+
resource = f"/data/wow/covenant/conduit/{conduit_id}"
|
|
161
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
162
|
+
return super().get_resource(resource, region, query_params)
|
|
111
163
|
|
|
112
164
|
# Creature API
|
|
113
165
|
|
|
@@ -224,7 +276,21 @@ class WowGameDataApi(Api):
|
|
|
224
276
|
namespace = f"static-classic-{region}" if is_classic else f"static-{region}"
|
|
225
277
|
query_params = {"namespace": namespace, "locale": locale}
|
|
226
278
|
return super().get_resource(resource, region, query_params)
|
|
279
|
+
|
|
280
|
+
# Heirloom API
|
|
281
|
+
|
|
282
|
+
def get_heirloom_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
283
|
+
"""Return an index of heirlooms."""
|
|
284
|
+
resource = "/data/wow/heirloom/index"
|
|
285
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
286
|
+
return super().get_resource(resource, region, query_params)
|
|
227
287
|
|
|
288
|
+
def get_heirloom(self, region: str, locale: str, heirloom_id: int) -> Dict[str, Any]:
|
|
289
|
+
"""Return an heirloom by ID."""
|
|
290
|
+
resource = f"/data/wow/heirloom/{heirloom_id}"
|
|
291
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
292
|
+
return super().get_resource(resource, region, query_params)
|
|
293
|
+
|
|
228
294
|
# Item API
|
|
229
295
|
|
|
230
296
|
def get_item_classes_index(
|
|
@@ -690,14 +756,14 @@ class WowGameDataApi(Api):
|
|
|
690
756
|
|
|
691
757
|
# Power Type API
|
|
692
758
|
|
|
693
|
-
def get_power_types_index(self, region: str, locale: str, is_classic: bool = False) -> Any:
|
|
759
|
+
def get_power_types_index(self, region: str, locale: str, is_classic: bool = False) -> Dict[str, Any]:
|
|
694
760
|
"""Return an index of power types."""
|
|
695
761
|
resource = "/data/wow/power-type/index"
|
|
696
762
|
namespace = f"static-classic-{region}" if is_classic else f"static-{region}"
|
|
697
763
|
query_params = {"namespace": namespace, "locale": locale}
|
|
698
764
|
return super().get_resource(resource, region, query_params)
|
|
699
765
|
|
|
700
|
-
def get_power_type(self, region: str, locale: str, power_type_id: int, is_classic: bool = False) -> Any:
|
|
766
|
+
def get_power_type(self, region: str, locale: str, power_type_id: int, is_classic: bool = False) -> Dict[str, Any]:
|
|
701
767
|
"""Return a power type by ID."""
|
|
702
768
|
resource = f"/data/wow/power-type/{power_type_id}"
|
|
703
769
|
namespace = f"static-classic-{region}" if is_classic else f"static-{region}"
|
|
@@ -706,37 +772,37 @@ class WowGameDataApi(Api):
|
|
|
706
772
|
|
|
707
773
|
# Profession API
|
|
708
774
|
|
|
709
|
-
def get_professions_index(self, region: str, locale: str) -> Any:
|
|
775
|
+
def get_professions_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
710
776
|
"""Return an index of professions."""
|
|
711
777
|
resource = "/data/wow/profession/index"
|
|
712
778
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
713
779
|
return super().get_resource(resource, region, query_params)
|
|
714
780
|
|
|
715
|
-
def get_profession(self, region: str, locale: str, profession_id: int) -> Any:
|
|
781
|
+
def get_profession(self, region: str, locale: str, profession_id: int) -> Dict[str, Any]:
|
|
716
782
|
"""Return a profession by ID."""
|
|
717
783
|
resource = f"/data/wow/profession/{profession_id}"
|
|
718
784
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
719
785
|
return super().get_resource(resource, region, query_params)
|
|
720
786
|
|
|
721
|
-
def get_profession_media(self, region: str, locale: str, profession_id: int) -> Any:
|
|
787
|
+
def get_profession_media(self, region: str, locale: str, profession_id: int) -> Dict[str, Any]:
|
|
722
788
|
"""Return media for a profession by ID."""
|
|
723
789
|
resource = f"/data/wow/media/profession/{profession_id}"
|
|
724
790
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
725
791
|
return super().get_resource(resource, region, query_params)
|
|
726
792
|
|
|
727
|
-
def get_profession_skill_tier(self, region: str, locale: str, profession_id: int, skill_tier_id: int) -> Any:
|
|
793
|
+
def get_profession_skill_tier(self, region: str, locale: str, profession_id: int, skill_tier_id: int) -> Dict[str, Any]:
|
|
728
794
|
"""Return a skill tier for a profession by ID."""
|
|
729
795
|
resource = f"/data/wow/profession/{profession_id}/skill-tier/{skill_tier_id}"
|
|
730
796
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
731
797
|
return super().get_resource(resource, region, query_params)
|
|
732
798
|
|
|
733
|
-
def get_recipe(self, region: str, locale: str, recipe_id: int) -> Any:
|
|
799
|
+
def get_recipe(self, region: str, locale: str, recipe_id: int) -> Dict[str, Any]:
|
|
734
800
|
"""Return a recipe by ID."""
|
|
735
801
|
resource = f"/data/wow/recipe/{recipe_id}"
|
|
736
802
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
737
803
|
return super().get_resource(resource, region, query_params)
|
|
738
804
|
|
|
739
|
-
def get_recipe_media(self, region: str, locale: str, recipe_id: int) -> Any:
|
|
805
|
+
def get_recipe_media(self, region: str, locale: str, recipe_id: int) -> Dict[str, Any]:
|
|
740
806
|
"""Return media for a recipe by ID."""
|
|
741
807
|
resource = f"/data/wow/media/recipe/{recipe_id}"
|
|
742
808
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
@@ -744,31 +810,31 @@ class WowGameDataApi(Api):
|
|
|
744
810
|
|
|
745
811
|
# Pvp Season API
|
|
746
812
|
|
|
747
|
-
def get_pvp_seasons_index(self, region: str, locale: str) -> Any:
|
|
813
|
+
def get_pvp_seasons_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
748
814
|
"""Return an index of Pvp seasons."""
|
|
749
815
|
resource = "/data/wow/pvp-season/index"
|
|
750
816
|
query_params = {"namespace": f"dynamic-{region}", "locale": locale}
|
|
751
817
|
return super().get_resource(resource, region, query_params)
|
|
752
818
|
|
|
753
|
-
def get_pvp_season(self, region: str, locale: str, pvp_season_id: int) -> Any:
|
|
819
|
+
def get_pvp_season(self, region: str, locale: str, pvp_season_id: int) -> Dict[str, Any]:
|
|
754
820
|
"""Return a Pvp season by ID."""
|
|
755
821
|
resource = f"/data/wow/pvp-season/{pvp_season_id}"
|
|
756
822
|
query_params = {"namespace": f"dynamic-{region}", "locale": locale}
|
|
757
823
|
return super().get_resource(resource, region, query_params)
|
|
758
824
|
|
|
759
|
-
def get_pvp_leaderboards_index(self, region: str, locale: str, pvp_season_id: int) -> Any:
|
|
825
|
+
def get_pvp_leaderboards_index(self, region: str, locale: str, pvp_season_id: int) -> Dict[str, Any]:
|
|
760
826
|
"""Return an index of Pvp leaderboards for a Pvp season."""
|
|
761
827
|
resource = f"/data/wow/pvp-season/{pvp_season_id}/pvp-leaderboard/index"
|
|
762
828
|
query_params = {"namespace": f"dynamic-{region}", "locale": locale}
|
|
763
829
|
return super().get_resource(resource, region, query_params)
|
|
764
830
|
|
|
765
|
-
def get_pvp_leaderboard(self, region: str, locale: str, pvp_season_id: int, pvp_bracket: str) -> Any:
|
|
831
|
+
def get_pvp_leaderboard(self, region: str, locale: str, pvp_season_id: int, pvp_bracket: str) -> Dict[str, Any]:
|
|
766
832
|
"""Return the Pvp leaderboard of a specific Pvp bracket for a Pvp season."""
|
|
767
833
|
resource = f"/data/wow/pvp-season/{pvp_season_id}/pvp-leaderboard/{pvp_bracket}"
|
|
768
834
|
query_params = {"namespace": f"dynamic-{region}", "locale": locale}
|
|
769
835
|
return super().get_resource(resource, region, query_params)
|
|
770
836
|
|
|
771
|
-
def get_pvp_rewards_index(self, region: str, locale: str, pvp_season_id: int) -> Any:
|
|
837
|
+
def get_pvp_rewards_index(self, region: str, locale: str, pvp_season_id: int) -> Dict[str, Any]:
|
|
772
838
|
"""Return an index of Pvp rewards for a Pvp season."""
|
|
773
839
|
resource = f"/data/wow/pvp-season/{pvp_season_id}/pvp-reward/index"
|
|
774
840
|
query_params = {"namespace": f"dynamic-{region}", "locale": locale}
|
|
@@ -776,19 +842,19 @@ class WowGameDataApi(Api):
|
|
|
776
842
|
|
|
777
843
|
# Pvp Tier API
|
|
778
844
|
|
|
779
|
-
def get_pvp_tier_media(self, region: str, locale: str, pvp_tier_id: int) -> Any:
|
|
845
|
+
def get_pvp_tier_media(self, region: str, locale: str, pvp_tier_id: int) -> Dict[str, Any]:
|
|
780
846
|
"""Return media for a Pvp tier by ID."""
|
|
781
847
|
resource = f"/data/wow/media/pvp-tier/{pvp_tier_id}"
|
|
782
848
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
783
849
|
return super().get_resource(resource, region, query_params)
|
|
784
850
|
|
|
785
|
-
def get_pvp_tiers_index(self, region: str, locale: str) -> Any:
|
|
851
|
+
def get_pvp_tiers_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
786
852
|
"""Return an index of Pvp tiers."""
|
|
787
853
|
resource = "/data/wow/pvp-tier/index"
|
|
788
854
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
789
855
|
return super().get_resource(resource, region, query_params)
|
|
790
856
|
|
|
791
|
-
def get_pvp_tier(self, region: str, locale: str, pvp_tier_id: int) -> Any:
|
|
857
|
+
def get_pvp_tier(self, region: str, locale: str, pvp_tier_id: int) -> Dict[str, Any]:
|
|
792
858
|
"""Return a Pvp tier by ID."""
|
|
793
859
|
resource = f"/data/wow/pvp-tier/{pvp_tier_id}"
|
|
794
860
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
@@ -796,49 +862,49 @@ class WowGameDataApi(Api):
|
|
|
796
862
|
|
|
797
863
|
# Quest API
|
|
798
864
|
|
|
799
|
-
def get_quests_index(self, region: str, locale: str) -> Any:
|
|
865
|
+
def get_quests_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
800
866
|
"""Return the parent index for quests."""
|
|
801
867
|
resource = "/data/wow/quest/index"
|
|
802
868
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
803
869
|
return super().get_resource(resource, region, query_params)
|
|
804
870
|
|
|
805
|
-
def get_quest(self, region: str, locale: str, quest_id: int) -> Any:
|
|
871
|
+
def get_quest(self, region: str, locale: str, quest_id: int) -> Dict[str, Any]:
|
|
806
872
|
"""Return a quest by ID."""
|
|
807
873
|
resource = f"/data/wow/quest/{quest_id}"
|
|
808
874
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
809
875
|
return super().get_resource(resource, region, query_params)
|
|
810
876
|
|
|
811
|
-
def get_quest_categories_index(self, region: str, locale: str) -> Any:
|
|
877
|
+
def get_quest_categories_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
812
878
|
"""Return an index of quest categories (such as quests for a specific class, profession, or storyline)."""
|
|
813
879
|
resource = "/data/wow/quest/category/index"
|
|
814
880
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
815
881
|
return super().get_resource(resource, region, query_params)
|
|
816
882
|
|
|
817
|
-
def get_quest_category(self, region: str, locale: str, quest_category_id: int) -> Any:
|
|
883
|
+
def get_quest_category(self, region: str, locale: str, quest_category_id: int) -> Dict[str, Any]:
|
|
818
884
|
"""Return a quest category by ID."""
|
|
819
885
|
resource = f"/data/wow/quest/category/{quest_category_id}"
|
|
820
886
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
821
887
|
return super().get_resource(resource, region, query_params)
|
|
822
888
|
|
|
823
|
-
def get_quest_areas_index(self, region: str, locale: str) -> Any:
|
|
889
|
+
def get_quest_areas_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
824
890
|
"""Return an index of quest areas."""
|
|
825
891
|
resource = "/data/wow/quest/area/index"
|
|
826
892
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
827
893
|
return super().get_resource(resource, region, query_params)
|
|
828
894
|
|
|
829
|
-
def get_quest_area(self, region: str, locale: str, quest_area_id: int) -> Any:
|
|
895
|
+
def get_quest_area(self, region: str, locale: str, quest_area_id: int) -> Dict[str, Any]:
|
|
830
896
|
"""Return a quest area by ID."""
|
|
831
897
|
resource = f"/data/wow/quest/area/{quest_area_id}"
|
|
832
898
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
833
899
|
return super().get_resource(resource, region, query_params)
|
|
834
900
|
|
|
835
|
-
def get_quest_types_index(self, region: str, locale: str) -> Any:
|
|
901
|
+
def get_quest_types_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
836
902
|
"""Return an index of quest types (such as Pvp quests, raid quests, or account quests)."""
|
|
837
903
|
resource = "/data/wow/quest/type/index"
|
|
838
904
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
839
905
|
return super().get_resource(resource, region, query_params)
|
|
840
906
|
|
|
841
|
-
def get_quest_type(self, region: str, locale: str, quest_type_id: int) -> Any:
|
|
907
|
+
def get_quest_type(self, region: str, locale: str, quest_type_id: int) -> Dict[str, Any]:
|
|
842
908
|
"""Return a quest type by ID."""
|
|
843
909
|
resource = f"/data/wow/quest/type/{quest_type_id}"
|
|
844
910
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
@@ -846,14 +912,14 @@ class WowGameDataApi(Api):
|
|
|
846
912
|
|
|
847
913
|
# Realm API
|
|
848
914
|
|
|
849
|
-
def get_realms_index(self, region: str, locale: str, is_classic: bool = False) -> Any:
|
|
915
|
+
def get_realms_index(self, region: str, locale: str, is_classic: bool = False) -> Dict[str, Any]:
|
|
850
916
|
"""Return an index of realms."""
|
|
851
917
|
resource = "/data/wow/realm/index"
|
|
852
918
|
namespace = f"dynamic-classic-{region}" if is_classic else f"dynamic-{region}"
|
|
853
919
|
query_params = {"namespace": namespace, "locale": locale}
|
|
854
920
|
return super().get_resource(resource, region, query_params)
|
|
855
921
|
|
|
856
|
-
def get_realm(self, region: str, locale: str, realm_slug: str, is_classic: bool = False) -> Any:
|
|
922
|
+
def get_realm(self, region: str, locale: str, realm_slug: str, is_classic: bool = False) -> Dict[str, Any]:
|
|
857
923
|
"""Return a single realm by slug or ID."""
|
|
858
924
|
resource = f"/data/wow/realm/{realm_slug}"
|
|
859
925
|
namespace = f"dynamic-classic-{region}" if is_classic else f"dynamic-{region}"
|
|
@@ -862,14 +928,14 @@ class WowGameDataApi(Api):
|
|
|
862
928
|
|
|
863
929
|
# Region API
|
|
864
930
|
|
|
865
|
-
def get_regions_index(self, region: str, locale: str, is_classic: bool = False) -> Any:
|
|
931
|
+
def get_regions_index(self, region: str, locale: str, is_classic: bool = False) -> Dict[str, Any]:
|
|
866
932
|
"""Return an index of regions."""
|
|
867
933
|
resource = "/data/wow/region/index"
|
|
868
934
|
namespace = f"dynamic-classic-{region}" if is_classic else f"dynamic-{region}"
|
|
869
935
|
query_params = {"namespace": namespace, "locale": locale}
|
|
870
936
|
return super().get_resource(resource, region, query_params)
|
|
871
937
|
|
|
872
|
-
def get_region(self, region: str, locale: str, region_id: int, is_classic: bool = False) -> Any:
|
|
938
|
+
def get_region(self, region: str, locale: str, region_id: int, is_classic: bool = False) -> Dict[str, Any]:
|
|
873
939
|
"""Return a region by ID."""
|
|
874
940
|
resource = f"/data/wow/region/{region_id}"
|
|
875
941
|
namespace = f"dynamic-classic-{region}" if is_classic else f"dynamic-{region}"
|
|
@@ -878,25 +944,25 @@ class WowGameDataApi(Api):
|
|
|
878
944
|
|
|
879
945
|
# Reputations API
|
|
880
946
|
|
|
881
|
-
def get_reputation_factions_index(self, region: str, locale: str) -> Any:
|
|
947
|
+
def get_reputation_factions_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
882
948
|
"""Return an index of reputation factions."""
|
|
883
949
|
resource = "/data/wow/reputation-faction/index"
|
|
884
950
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
885
951
|
return super().get_resource(resource, region, query_params)
|
|
886
952
|
|
|
887
|
-
def get_reputation_faction(self, region: str, locale: str, reputation_faction_id: int) -> Any:
|
|
953
|
+
def get_reputation_faction(self, region: str, locale: str, reputation_faction_id: int) -> Dict[str, Any]:
|
|
888
954
|
"""Return a single reputation faction by ID."""
|
|
889
955
|
resource = f"/data/wow/reputation-faction/{reputation_faction_id}"
|
|
890
956
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
891
957
|
return super().get_resource(resource, region, query_params)
|
|
892
958
|
|
|
893
|
-
def get_reputation_tiers_index(self, region: str, locale: str) -> Any:
|
|
959
|
+
def get_reputation_tiers_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
894
960
|
"""Return an index of reputation tiers."""
|
|
895
961
|
resource = "/data/wow/reputation-tiers/index"
|
|
896
962
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
897
963
|
return super().get_resource(resource, region, query_params)
|
|
898
964
|
|
|
899
|
-
def get_reputation_tier(self, region: str, locale: str, reputation_tiers_id: int) -> Any:
|
|
965
|
+
def get_reputation_tier(self, region: str, locale: str, reputation_tiers_id: int) -> Dict[str, Any]:
|
|
900
966
|
"""Return a single set of reputation tiers by ID."""
|
|
901
967
|
resource = f"/data/wow/reputation-tiers/{reputation_tiers_id}"
|
|
902
968
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
@@ -904,13 +970,13 @@ class WowGameDataApi(Api):
|
|
|
904
970
|
|
|
905
971
|
# Spell API
|
|
906
972
|
|
|
907
|
-
def get_spell(self, region: str, locale: str, spell_id: int) -> Any:
|
|
973
|
+
def get_spell(self, region: str, locale: str, spell_id: int) -> Dict[str, Any]:
|
|
908
974
|
"""Return a spell by ID."""
|
|
909
975
|
resource = f"/data/wow/spell/{spell_id}"
|
|
910
976
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
911
977
|
return super().get_resource(resource, region, query_params)
|
|
912
978
|
|
|
913
|
-
def get_spell_media(self, region: str, locale: str, spell_id: int) -> Any:
|
|
979
|
+
def get_spell_media(self, region: str, locale: str, spell_id: int) -> Dict[str, Any]:
|
|
914
980
|
"""Return media for a spell by ID."""
|
|
915
981
|
resource = f"/data/wow/media/spell/{spell_id}"
|
|
916
982
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
@@ -918,47 +984,93 @@ class WowGameDataApi(Api):
|
|
|
918
984
|
|
|
919
985
|
# Talent API
|
|
920
986
|
|
|
921
|
-
def get_talents_index(self, region: str, locale: str) -> Any:
|
|
987
|
+
def get_talents_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
922
988
|
"""Return an index of talents."""
|
|
923
989
|
resource = "/data/wow/talent/index"
|
|
924
990
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
925
991
|
return super().get_resource(resource, region, query_params)
|
|
926
992
|
|
|
927
|
-
def get_talent(self, region: str, locale: str, talent_id: int) -> Any:
|
|
993
|
+
def get_talent(self, region: str, locale: str, talent_id: int) -> Dict[str, Any]:
|
|
928
994
|
"""Return a talent by ID."""
|
|
929
995
|
resource = f"/data/wow/talent/{talent_id}"
|
|
930
996
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
931
997
|
return super().get_resource(resource, region, query_params)
|
|
932
998
|
|
|
933
|
-
def get_pvp_talents_index(self, region: str, locale: str) -> Any:
|
|
999
|
+
def get_pvp_talents_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
934
1000
|
"""Return an index of Pvp talents."""
|
|
935
1001
|
resource = "/data/wow/pvp-talent/index"
|
|
936
1002
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
937
1003
|
return super().get_resource(resource, region, query_params)
|
|
938
1004
|
|
|
939
|
-
def get_pvp_talent(self, region: str, locale: str, pvp_talent_id: int) -> Any:
|
|
1005
|
+
def get_pvp_talent(self, region: str, locale: str, pvp_talent_id: int) -> Dict[str, Any]:
|
|
940
1006
|
"""Return a Pvp talent by ID."""
|
|
941
1007
|
resource = f"/data/wow/pvp-talent/{pvp_talent_id}"
|
|
942
1008
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
943
1009
|
return super().get_resource(resource, region, query_params)
|
|
944
1010
|
|
|
1011
|
+
# Tech Talent API
|
|
1012
|
+
|
|
1013
|
+
def get_tech_talent_tree_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
1014
|
+
"""Returns an index of tech talent trees."""
|
|
1015
|
+
resource = "/data/wow/tech-talent-tree/index"
|
|
1016
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
1017
|
+
return super().get_resource(resource, region, query_params)
|
|
1018
|
+
|
|
1019
|
+
def get_tech_talent_tree(self, region: str, locale: str, tech_talent_tree_id: int) -> Dict[str, Any]:
|
|
1020
|
+
"""Return a tech talent tree by ID."""
|
|
1021
|
+
resource = f"/data/wow/tech-talent-tree/{tech_talent_tree_id}"
|
|
1022
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
1023
|
+
return super().get_resource(resource, region, query_params)
|
|
1024
|
+
|
|
1025
|
+
def get_tech_talent_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
1026
|
+
"""Return an index of tech talents."""
|
|
1027
|
+
resource = f"/data/wow/tech-talent/index"
|
|
1028
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
1029
|
+
return super().get_resource(resource, region, query_params)
|
|
1030
|
+
|
|
1031
|
+
def get_tech_talent(self, region: str, locale: str, tech_talent_id: int) -> Dict[str, Any]:
|
|
1032
|
+
"""Return a tech talent by ID."""
|
|
1033
|
+
resource = f"/data/wow/tech-talent/{tech_talent_id}"
|
|
1034
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
1035
|
+
return super().get_resource(resource, region, query_params)
|
|
1036
|
+
|
|
1037
|
+
def get_tech_talent_media(self, region: str, locale: str, tech_talent_id: int) -> Dict[str, Any]:
|
|
1038
|
+
"""Return media for a tech talent by ID."""
|
|
1039
|
+
resource = f"/data/wow/media/tech-talent/{tech_talent_id}"
|
|
1040
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
1041
|
+
return super().get_resource(resource, region, query_params)
|
|
1042
|
+
|
|
945
1043
|
# Title API
|
|
946
1044
|
|
|
947
|
-
def get_titles_index(self, region: str, locale: str) -> Any:
|
|
1045
|
+
def get_titles_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
948
1046
|
"""Return an index of titles."""
|
|
949
1047
|
resource = "/data/wow/title/index"
|
|
950
1048
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
951
1049
|
return super().get_resource(resource, region, query_params)
|
|
952
1050
|
|
|
953
|
-
def get_title(self, region: str, locale: str, title_id: int) -> Any:
|
|
1051
|
+
def get_title(self, region: str, locale: str, title_id: int) -> Dict[str, Any]:
|
|
954
1052
|
"""Return a title by ID."""
|
|
955
1053
|
resource = f"/data/wow/title/{title_id}"
|
|
956
1054
|
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
957
1055
|
return super().get_resource(resource, region, query_params)
|
|
1056
|
+
|
|
1057
|
+
# Toy API
|
|
1058
|
+
|
|
1059
|
+
def get_toy_index(self, region: str, locale: str) -> Dict[str, Any]:
|
|
1060
|
+
"""Return an index of toys."""
|
|
1061
|
+
resource = "/data/wow/toy/index"
|
|
1062
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
1063
|
+
return super().get_resource(resource, region, query_params)
|
|
1064
|
+
|
|
1065
|
+
def get_toy(self, region: str, locale: str, toy_id: int) -> Dict[str, Any]:
|
|
1066
|
+
"""Return a toy by ID."""
|
|
1067
|
+
resource = f"/data/wow/toy/{toy_id}"
|
|
1068
|
+
query_params = {"namespace": f"static-{region}", "locale": locale}
|
|
1069
|
+
return super().get_resource(resource, region, query_params)
|
|
958
1070
|
|
|
959
1071
|
# Wow Token API
|
|
960
1072
|
|
|
961
|
-
def get_token_index(self, region: str, locale: str, is_classic: bool = False) -> Any:
|
|
1073
|
+
def get_token_index(self, region: str, locale: str, is_classic: bool = False) -> Dict[str, Any]:
|
|
962
1074
|
"""Return the Wow Token index."""
|
|
963
1075
|
resource = "/data/wow/token/index"
|
|
964
1076
|
namespace = f"dynamic-classic-{region}" if is_classic else f"dynamic-{region}"
|
|
@@ -68,6 +68,26 @@ class WowProfileApi(Api):
|
|
|
68
68
|
"access_token": access_token,
|
|
69
69
|
}
|
|
70
70
|
return super().get_resource(resource, region, query_params)
|
|
71
|
+
|
|
72
|
+
def get_account_toys_collection_summary(self, region: str, locale: str, access_token: str) -> Dict[str, Any]:
|
|
73
|
+
"""Return a summary of the toys an account has obtained."""
|
|
74
|
+
resource = "/profile/user/wow/collections/toys"
|
|
75
|
+
query_params = {
|
|
76
|
+
"namespace": f"profile-{region}",
|
|
77
|
+
"locale": locale,
|
|
78
|
+
"access_token": access_token,
|
|
79
|
+
}
|
|
80
|
+
return super().get_resource(resource, region, query_params)
|
|
81
|
+
|
|
82
|
+
def get_account_heirlooms_collection_summary(self, region: str, locale: str, access_token: str) -> Dict[str, Any]:
|
|
83
|
+
"""Return a summary of the heirlooms an account has obtained."""
|
|
84
|
+
resource = "/profile/user/wow/collections/heirlooms"
|
|
85
|
+
query_params = {
|
|
86
|
+
"namespace": f"profile-{region}",
|
|
87
|
+
"locale": locale,
|
|
88
|
+
"access_token": access_token,
|
|
89
|
+
}
|
|
90
|
+
return super().get_resource(resource, region, query_params)
|
|
71
91
|
|
|
72
92
|
# Character Achievements API
|
|
73
93
|
|
|
@@ -107,7 +127,7 @@ class WowProfileApi(Api):
|
|
|
107
127
|
query_params = {"namespace": f"profile-{region}", "locale": locale}
|
|
108
128
|
return super().get_resource(resource, region, query_params)
|
|
109
129
|
|
|
110
|
-
def
|
|
130
|
+
def get_character_mounts_collection_summary(
|
|
111
131
|
self, region: str, locale: str, realm_slug: str, character_name: str
|
|
112
132
|
) -> Dict[str, Any]:
|
|
113
133
|
"""Return a summary of the mounts a character has obtained."""
|
|
@@ -117,7 +137,7 @@ class WowProfileApi(Api):
|
|
|
117
137
|
query_params = {"namespace": f"profile-{region}", "locale": locale}
|
|
118
138
|
return super().get_resource(resource, region, query_params)
|
|
119
139
|
|
|
120
|
-
def
|
|
140
|
+
def get_character_pets_collection_summary(
|
|
121
141
|
self, region: str, locale: str, realm_slug: str, character_name: str
|
|
122
142
|
) -> Dict[str, Any]:
|
|
123
143
|
"""Return a summary of the battle pets a character has obtained."""
|
|
@@ -126,6 +146,27 @@ class WowProfileApi(Api):
|
|
|
126
146
|
)
|
|
127
147
|
query_params = {"namespace": f"profile-{region}", "locale": locale}
|
|
128
148
|
return super().get_resource(resource, region, query_params)
|
|
149
|
+
|
|
150
|
+
def get_character_toys_collection_summary(
|
|
151
|
+
self, region: str, locale: str, realm_slug: str, character_name: str
|
|
152
|
+
) -> Dict[str, Any]:
|
|
153
|
+
"""Return a summary of the toys a character has obtained."""
|
|
154
|
+
resource = (
|
|
155
|
+
f"/profile/wow/character/{realm_slug}/{character_name}/collections/toys"
|
|
156
|
+
)
|
|
157
|
+
query_params = {"namespace": f"profile-{region}", "locale": locale}
|
|
158
|
+
return super().get_resource(resource, region, query_params)
|
|
159
|
+
|
|
160
|
+
def get_character_heirlooms_collection_summary(
|
|
161
|
+
self, region: str, locale: str, realm_slug: str, character_name: str
|
|
162
|
+
) -> Dict[str, Any]:
|
|
163
|
+
"""Return a summary of the toys a character has obtained."""
|
|
164
|
+
resource = (
|
|
165
|
+
f"/profile/wow/character/{realm_slug}/{character_name}/collections/heirlooms"
|
|
166
|
+
)
|
|
167
|
+
query_params = {"namespace": f"profile-{region}", "locale": locale}
|
|
168
|
+
return super().get_resource(resource, region, query_params)
|
|
169
|
+
|
|
129
170
|
|
|
130
171
|
# Character Encounters API
|
|
131
172
|
|
|
@@ -276,6 +317,14 @@ class WowProfileApi(Api):
|
|
|
276
317
|
query_params = {"namespace": f"profile-{region}", "locale": locale}
|
|
277
318
|
return super().get_resource(resource, region, query_params)
|
|
278
319
|
|
|
320
|
+
# Character Soulbinds API
|
|
321
|
+
|
|
322
|
+
def get_character_soulbinds(self, region: str, locale: str, realm_slug: str, character_name: str) -> Dict[str, Any]:
|
|
323
|
+
"""Return a summary of a character's soulbinds."""
|
|
324
|
+
resource = f"/profile/wow/character/{realm_slug}/{character_name}/soulbinds"
|
|
325
|
+
query_params = {"namespace": f"profile-{region}", "locale": locale}
|
|
326
|
+
return super().get_resource(resource, region, query_params)
|
|
327
|
+
|
|
279
328
|
# Character Specializations API
|
|
280
329
|
|
|
281
330
|
def get_character_specializations_summary(
|
|
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-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/hearthstone/hearthstone_game_data_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/starcraft2/starcraft2_community_api.py
RENAMED
|
File without changes
|
{blizzardapi2-0.1.2 → blizzardapi2-0.1.3}/blizzardapi2/starcraft2/starcraft2_game_data_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|