blizzardapi2 0.1.0__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.
@@ -0,0 +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.
@@ -0,0 +1,79 @@
1
+ Metadata-Version: 2.1
2
+ Name: blizzardapi2
3
+ Version: 0.1.0
4
+ Summary: A Python wrapper for Blizzard API
5
+ License: MIT
6
+ Author: Your Name
7
+ Author-email: you@example.com
8
+ Requires-Python: >=3.11,<4.0
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Requires-Dist: black (>=24.4.2,<25.0.0)
14
+ Requires-Dist: pytest (>=8.2.2,<9.0.0)
15
+ Requires-Dist: requests (>=2.32.3,<3.0.0)
16
+ Description-Content-Type: text/markdown
17
+
18
+ # python-blizzardapi2
19
+ ![GitHub](https://img.shields.io/github/license/lostcol0ny/python-blizzardapi2)
20
+
21
+ python-blizzardapi2 is a client library for Blizzard's APIs. It's a fork of [the original library](https://github.com/trevorphillipscoding/python-blizzardapi/) and I'm trying to update it and keep its packages managed.
22
+
23
+ Current supported features include:
24
+ - Battle.net User
25
+ - Wow Profile
26
+ - Wow Game Data
27
+ - Wow Classic Game Data
28
+ - Diablo 3 Community
29
+ - Diablo 3 Game Data
30
+ - Hearthstone Game Data
31
+
32
+ To gain access to Blizzard's API please register [here](https://develop.battle.net/access/) to obtain a client id and client secret.
33
+
34
+ For more information on Blizzard's API visit:
35
+
36
+ [Official Documentation](https://develop.battle.net/documentation)
37
+ [Official API Forum](https://us.forums.blizzard.com/en/blizzard/c/api-discussion)
38
+
39
+ # Requirements
40
+
41
+ Python (3.9, 3.10, 3.11)
42
+
43
+ # Installing
44
+
45
+ `pip install python-blizzardapi2`
46
+
47
+ # Example
48
+
49
+ **main.py**
50
+ ```python
51
+ from blizzardapi2 import BlizzardApi
52
+
53
+ api_client = BlizzardApi("client_id", "client_secret")
54
+
55
+ # Unprotected API endpoint
56
+ categories_index = api_client.wow.game_data.get_achievement_categories_index("us", "en_US")
57
+
58
+ # Protected API endpoint
59
+ summary = api_client.wow.profile.get_account_profile_summary("us", "en_US", "access_token")
60
+
61
+ # Wow Classic endpoint
62
+ connected_realms_index = api_client.wow.game_data.get_connected_realms_index("us", "en_US", is_classic=True)
63
+ ```
64
+
65
+ # Access token vs Client ID/Client Secret
66
+
67
+ 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.
68
+
69
+ Here is the list of endpoints, specified by Blizzard, that require an OAuth token.
70
+
71
+ ```
72
+ GET /oauth/userinfo
73
+ GET /profile/user/wow
74
+ GET /profile/user/wow/protected-character/{realm-id}-{character-id}
75
+ GET /profile/user/wow/collections
76
+ GET /profile/user/wow/collections/pets
77
+ GET /profile/user/wow/collections/mounts
78
+ ```
79
+
@@ -0,0 +1,61 @@
1
+ # python-blizzardapi2
2
+ ![GitHub](https://img.shields.io/github/license/lostcol0ny/python-blizzardapi2)
3
+
4
+ python-blizzardapi2 is a client library for Blizzard's APIs. It's a fork of [the original library](https://github.com/trevorphillipscoding/python-blizzardapi/) and I'm trying to update it and keep its packages managed.
5
+
6
+ Current supported features include:
7
+ - Battle.net User
8
+ - Wow Profile
9
+ - Wow Game Data
10
+ - Wow Classic Game Data
11
+ - Diablo 3 Community
12
+ - Diablo 3 Game Data
13
+ - Hearthstone Game Data
14
+
15
+ To gain access to Blizzard's API please register [here](https://develop.battle.net/access/) to obtain a client id and client secret.
16
+
17
+ For more information on Blizzard's API visit:
18
+
19
+ [Official Documentation](https://develop.battle.net/documentation)
20
+ [Official API Forum](https://us.forums.blizzard.com/en/blizzard/c/api-discussion)
21
+
22
+ # Requirements
23
+
24
+ Python (3.9, 3.10, 3.11)
25
+
26
+ # Installing
27
+
28
+ `pip install python-blizzardapi2`
29
+
30
+ # Example
31
+
32
+ **main.py**
33
+ ```python
34
+ from blizzardapi2 import BlizzardApi
35
+
36
+ api_client = BlizzardApi("client_id", "client_secret")
37
+
38
+ # Unprotected API endpoint
39
+ categories_index = api_client.wow.game_data.get_achievement_categories_index("us", "en_US")
40
+
41
+ # Protected API endpoint
42
+ summary = api_client.wow.profile.get_account_profile_summary("us", "en_US", "access_token")
43
+
44
+ # Wow Classic endpoint
45
+ connected_realms_index = api_client.wow.game_data.get_connected_realms_index("us", "en_US", is_classic=True)
46
+ ```
47
+
48
+ # Access token vs Client ID/Client Secret
49
+
50
+ 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.
51
+
52
+ Here is the list of endpoints, specified by Blizzard, that require an OAuth token.
53
+
54
+ ```
55
+ GET /oauth/userinfo
56
+ GET /profile/user/wow
57
+ GET /profile/user/wow/protected-character/{realm-id}-{character-id}
58
+ GET /profile/user/wow/collections
59
+ GET /profile/user/wow/collections/pets
60
+ GET /profile/user/wow/collections/mounts
61
+ ```
@@ -0,0 +1,4 @@
1
+ """__init__.py file."""
2
+ from requests.exceptions import * # noqa
3
+
4
+ from .blizzard_api import BlizzardApi # noqa
@@ -0,0 +1,94 @@
1
+ """api.py file."""
2
+ import requests
3
+
4
+
5
+ class Api:
6
+ """Base API class.
7
+
8
+ Attributes:
9
+ _client_id: A string client id supplied by Blizzard.
10
+ _client_secret: A string client secret supplied by Blizzard.
11
+ _access_token: A string access token that is used to access Blizzard's API.
12
+ _api_url: A string url used to call the API endpoints.
13
+ _api_url_cn: A string url used to call the china API endpoints.
14
+ _oauth_url: A string url used to call the OAuth API endpoints.
15
+ _oauth_url_cn: A string url used to call the china OAuth API endpoints.
16
+ _session: An open requests.Session instance.
17
+ """
18
+
19
+ def __init__(self, client_id, client_secret):
20
+ """Init Api."""
21
+ self._client_id = client_id
22
+ self._client_secret = client_secret
23
+ self._access_token = None
24
+
25
+ self._api_url = "https://{0}.api.blizzard.com{1}"
26
+ self._api_url_cn = "https://gateway.battlenet.com.cn{0}"
27
+
28
+ self._oauth_url = "https://{0}.battle.net{1}"
29
+ self._oauth_url_cn = "https://www.battlenet.com.cn{0}"
30
+
31
+ self._session = requests.Session()
32
+
33
+ def _get_client_token(self, region):
34
+ """Fetch an access token based on client id and client secret credentials.
35
+
36
+ Args:
37
+ region:
38
+ A string containing a region.
39
+ """
40
+ url = self._format_oauth_url("/oauth/token", region)
41
+ query_params = {"grant_type": "client_credentials"}
42
+
43
+ response = self._session.post(
44
+ url,
45
+ params=query_params,
46
+ auth=(self._client_id, self._client_secret),
47
+ )
48
+
49
+ return self._response_handler(response)
50
+
51
+ def _response_handler(self, response):
52
+ """Handle the response."""
53
+ return response.json()
54
+
55
+ def _request_handler(self, url, region, query_params):
56
+ """Handle the request."""
57
+ if self._access_token is None:
58
+ json = self._get_client_token(region)
59
+ self._access_token = json["access_token"]
60
+
61
+ if query_params.get("access_token") is None:
62
+ query_params["access_token"] = self._access_token
63
+
64
+ response = self._session.get(url, params=query_params)
65
+
66
+ return self._response_handler(response)
67
+
68
+ def _format_api_url(self, resource, region):
69
+ """Format the API url into a usable url."""
70
+ if region == "cn":
71
+ url = self._api_url_cn.format(resource)
72
+ else:
73
+ url = self._api_url.format(region, resource)
74
+
75
+ return url
76
+
77
+ def get_resource(self, resource, region, query_params={}):
78
+ """Direction handler for when fetching resources."""
79
+ url = self._format_api_url(resource, region)
80
+ return self._request_handler(url, region, query_params)
81
+
82
+ def _format_oauth_url(self, resource, region):
83
+ """Format the oauth url into a usable url."""
84
+ if region == "cn":
85
+ url = self._oauth_url_cn.format(resource)
86
+ else:
87
+ url = self._oauth_url.format(region, resource)
88
+
89
+ return url
90
+
91
+ def get_oauth_resource(self, resource, region, query_params={}):
92
+ """Direction handler for when fetching oauth resources."""
93
+ url = self._format_oauth_url(resource, region)
94
+ return self._request_handler(url, region, query_params)
@@ -0,0 +1 @@
1
+ """__init__.py file."""
@@ -0,0 +1,15 @@
1
+ """battlenet_api.py file."""
2
+ from .battlenet_oauth_api import BattlenetOauthApi
3
+
4
+
5
+ class BattlenetApi:
6
+ """Battle.net API class.
7
+
8
+ Attributes:
9
+ client_id: A string client id supplied by Blizzard.
10
+ client_secret: A string client secret supplied by Blizzard.
11
+ """
12
+
13
+ def __init__(self, client_id, client_secret):
14
+ """Init BattlenetApi."""
15
+ self.oauth = BattlenetOauthApi(client_id, client_secret)
@@ -0,0 +1,25 @@
1
+ """battlenet_oauth_api.py file."""
2
+ from ..api import Api
3
+
4
+
5
+ class BattlenetOauthApi(Api):
6
+ """All Battle.net OAuth API methods.
7
+
8
+ Attributes:
9
+ client_id: A string client id supplied by Blizzard.
10
+ client_secret: A string client secret supplied by Blizzard.
11
+ """
12
+
13
+ def __init__(self, client_id, client_secret):
14
+ """Init BattlenetOauthApi."""
15
+ super().__init__(client_id, client_secret)
16
+
17
+ # User Authentication
18
+
19
+ def get_user_info(self, region, access_token):
20
+ """Return basic information about the user associated with the current bearer token."""
21
+ resource = "/oauth/userinfo"
22
+ query_params = {
23
+ "access_token": access_token,
24
+ }
25
+ return super().get_oauth_resource(resource, region, query_params)
@@ -0,0 +1,21 @@
1
+ """blizzard_api.py file."""
2
+ from .battlenet.battlenet_api import BattlenetApi
3
+ from .diablo3.diablo3_api import Diablo3Api
4
+ from .hearthstone.hearthstone_api import HearthstoneApi
5
+ from .wow.wow_api import WowApi
6
+
7
+
8
+ class BlizzardApi:
9
+ """Blizzard API class.
10
+
11
+ Attributes:
12
+ client_id: A string client id supplied by Blizzard.
13
+ client_secret: A string client secret supplied by Blizzard.
14
+ """
15
+
16
+ def __init__(self, client_id, client_secret):
17
+ """Init BlizzardApi."""
18
+ self.battlenet = BattlenetApi(client_id, client_secret)
19
+ self.diablo3 = Diablo3Api(client_id, client_secret)
20
+ self.hearthstone = HearthstoneApi(client_id, client_secret)
21
+ self.wow = WowApi(client_id, client_secret)
@@ -0,0 +1 @@
1
+ """__init__.py file."""
@@ -0,0 +1,17 @@
1
+ """diablo3_api.py file."""
2
+ from .diablo3_community_api import Diablo3CommunityApi
3
+ from .diablo3_game_data_api import Diablo3GameDataApi
4
+
5
+
6
+ class Diablo3Api:
7
+ """Diablo3 API class.
8
+
9
+ Attributes:
10
+ client_id: A string client id supplied by Blizzard.
11
+ client_secret: A string client secret supplied by Blizzard.
12
+ """
13
+
14
+ def __init__(self, client_id, client_secret):
15
+ """Init Diablo3Api."""
16
+ self.community = Diablo3CommunityApi(client_id, client_secret)
17
+ self.game_data = Diablo3GameDataApi(client_id, client_secret)
@@ -0,0 +1,113 @@
1
+ """diablo3_community_api.py file."""
2
+ from ..api import Api
3
+
4
+
5
+ class Diablo3CommunityApi(Api):
6
+ """All Diablo 3 Community API methods.
7
+
8
+ Attributes:
9
+ client_id: A string client id supplied by Blizzard.
10
+ client_secret: A string client secret supplied by Blizzard.
11
+ """
12
+
13
+ def __init__(self, client_id, client_secret):
14
+ """Init Diablo3CommunityApi."""
15
+ super().__init__(client_id, client_secret)
16
+
17
+ # D3 Act API
18
+
19
+ def get_act_index(self, region, locale):
20
+ """Return an index of acts."""
21
+ resource = "/d3/data/act"
22
+ query_params = {"locale": locale}
23
+ return super().get_resource(resource, region, query_params)
24
+
25
+ def get_act(self, region, locale, act_id):
26
+ """Return a single act by ID."""
27
+ resource = f"/d3/data/act/{act_id}"
28
+ query_params = {"locale": locale}
29
+ return super().get_resource(resource, region, query_params)
30
+
31
+ # D3 Artisan and Recipe API
32
+
33
+ def get_artisan(self, region, locale, artisan_slug):
34
+ """Return a single artisan by slug."""
35
+ resource = f"/d3/data/artisan/{artisan_slug}"
36
+ query_params = {"locale": locale}
37
+ return super().get_resource(resource, region, query_params)
38
+
39
+ def get_recipe(self, region, locale, artisan_slug, recipe_slug):
40
+ """Return a single recipe by slug for the specified artisan."""
41
+ resource = f"/d3/data/artisan/{artisan_slug}/recipe/{recipe_slug}"
42
+ query_params = {"locale": locale}
43
+ return super().get_resource(resource, region, query_params)
44
+
45
+ # D3 Follower API
46
+
47
+ def get_follower(self, region, locale, follower_slug):
48
+ """Return a single follower by slug."""
49
+ resource = f"/d3/data/follower/{follower_slug}"
50
+ query_params = {"locale": locale}
51
+ return super().get_resource(resource, region, query_params)
52
+
53
+ # D3 Character Class and Skill API
54
+
55
+ def get_character_class(self, region, locale, class_slug):
56
+ """Return a single character class by slug."""
57
+ resource = f"/d3/data/hero/{class_slug}"
58
+ query_params = {"locale": locale}
59
+ return super().get_resource(resource, region, query_params)
60
+
61
+ def get_api_skill(self, region, locale, class_slug, skill_slug):
62
+ """Return a single skill by slug for a specific character class."""
63
+ resource = f"/d3/data/hero/{class_slug}/skill/{skill_slug}"
64
+ query_params = {"locale": locale}
65
+ return super().get_resource(resource, region, query_params)
66
+
67
+ # D3 Item Type API
68
+
69
+ def get_item_type_index(self, region, locale):
70
+ """Return an index of item types."""
71
+ resource = "/d3/data/item-type"
72
+ query_params = {"locale": locale}
73
+ return super().get_resource(resource, region, query_params)
74
+
75
+ def get_item_type(self, region, locale, item_type_slug):
76
+ """Return a single item type by slug."""
77
+ resource = f"/d3/data/item-type/{item_type_slug}"
78
+ query_params = {"locale": locale}
79
+ return super().get_resource(resource, region, query_params)
80
+
81
+ # D3 Item API
82
+
83
+ def get_item(self, region, locale, item_slug_id):
84
+ """Return a single item by item slug and ID."""
85
+ resource = f"/d3/data/item/{item_slug_id}"
86
+ query_params = {"locale": locale}
87
+ return super().get_resource(resource, region, query_params)
88
+
89
+ # D3 Profile API
90
+
91
+ def get_api_account(self, region, locale, account_id):
92
+ """Return the specified account profile."""
93
+ resource = f"/d3/profile/{account_id}/"
94
+ query_params = {"locale": locale}
95
+ return super().get_resource(resource, region, query_params)
96
+
97
+ def get_api_hero(self, region, locale, account_id, hero_id):
98
+ """Return a single hero."""
99
+ resource = f"/d3/profile/{account_id}/hero/{hero_id}"
100
+ query_params = {"locale": locale}
101
+ return super().get_resource(resource, region, query_params)
102
+
103
+ def get_api_detailed_hero_items(self, region, locale, account_id, hero_id):
104
+ """Return a list of items for the specified hero."""
105
+ resource = f"/d3/profile/{account_id}/hero/{hero_id}/items"
106
+ query_params = {"locale": locale}
107
+ return super().get_resource(resource, region, query_params)
108
+
109
+ def get_api_detailed_follower_items(self, region, locale, account_id, hero_id):
110
+ """Return a single item by item slug and ID."""
111
+ resource = f"/d3/profile/{account_id}/hero/{hero_id}/follower-items"
112
+ query_params = {"locale": locale}
113
+ return super().get_resource(resource, region, query_params)
@@ -0,0 +1,47 @@
1
+ """diablo3_game_data_api.py file."""
2
+ from ..api import Api
3
+
4
+
5
+ class Diablo3GameDataApi(Api):
6
+ """All Diablo 3 Game Data API methods.
7
+
8
+ Attributes:
9
+ client_id: A string client id supplied by Blizzard.
10
+ client_secret: A string client secret supplied by Blizzard.
11
+ """
12
+
13
+ def __init__(self, client_id, client_secret):
14
+ """Init Diablo3GameDataApi."""
15
+ super().__init__(client_id, client_secret)
16
+
17
+ # D3
18
+
19
+ def get_season_index(self, region):
20
+ """Return an index of available seasons."""
21
+ resource = "/data/d3/season/"
22
+ return super().get_resource(resource, region)
23
+
24
+ def get_season(self, region, season_id):
25
+ """Return a leaderboard list for the specified season."""
26
+ resource = f"/data/d3/season/{season_id}"
27
+ return super().get_resource(resource, region)
28
+
29
+ def get_season_leaderboard(self, region, season_id, leaderboard_id):
30
+ """Return a the specified leaderboard for the specified season."""
31
+ resource = f"/data/d3/season/{season_id}/leaderboard/{leaderboard_id}"
32
+ return super().get_resource(resource, region)
33
+
34
+ def get_era_index(self, region):
35
+ """Return an index of available eras."""
36
+ resource = "/data/d3/era/"
37
+ return super().get_resource(resource, region)
38
+
39
+ def get_era(self, region, era_id):
40
+ """Return a leaderboard list for a particular era."""
41
+ resource = f"/data/d3/era/{era_id}"
42
+ return super().get_resource(resource, region)
43
+
44
+ def get_era_leaderboard(self, region, era_id, leaderboard_id):
45
+ """Return the specified leaderboard for the specified era."""
46
+ resource = f"/data/d3/era/{era_id}/leaderboard/{leaderboard_id}"
47
+ return super().get_resource(resource, region)
@@ -0,0 +1 @@
1
+ """__init__.py file."""
@@ -0,0 +1,15 @@
1
+ """hearthstone_api.py file."""
2
+ from .hearthstone_game_data_api import HearthstoneGameDataApi
3
+
4
+
5
+ class HearthstoneApi:
6
+ """Hearthstone API class.
7
+
8
+ Attributes:
9
+ client_id: A string client id supplied by Blizzard.
10
+ client_secret: A string client secret supplied by Blizzard.
11
+ """
12
+
13
+ def __init__(self, client_id, client_secret):
14
+ """Init HearthstoneApi."""
15
+ self.game_data = HearthstoneGameDataApi(client_id, client_secret)
@@ -0,0 +1,65 @@
1
+ """hearthstone_game_data_api.py file."""
2
+ from ..api import Api
3
+
4
+
5
+ class HearthstoneGameDataApi(Api):
6
+ """All Hearthstone Game Data API methods.
7
+
8
+ Attributes:
9
+ client_id: A string client id supplied by Blizzard.
10
+ client_secret: A string client secret supplied by Blizzard.
11
+ """
12
+
13
+ def __init__(self, client_id, client_secret):
14
+ """Init HearthstoneGameDataApi."""
15
+ super().__init__(client_id, client_secret)
16
+
17
+ # Cards
18
+
19
+ def search_cards(self, region, locale, **query_params):
20
+ """Return an up-to-date list of all cards matching the search criteria."""
21
+ resource = "/hearthstone/cards"
22
+ query_params.update({"locale": locale})
23
+ return super().get_resource(resource, region, query_params)
24
+
25
+ def get_card(self, region, locale, id_or_slug, game_mode="constructed"):
26
+ """Return the card with an ID or slug that matches the one you specify."""
27
+ resource = f"/hearthstone/cards/{id_or_slug}"
28
+ query_params = {"locale": locale, "game_mode": game_mode}
29
+ return super().get_resource(resource, region, query_params)
30
+
31
+ # Card Backs
32
+
33
+ def search_card_backs(self, region, locale, **query_params):
34
+ """Return an up-to-date list of all card backs matching the search criteria."""
35
+ resource = "/hearthstone/cardbacks"
36
+ query_params.update({"locale": locale})
37
+ return super().get_resource(resource, region, query_params)
38
+
39
+ def get_card_back(self, region, locale, id_or_slug):
40
+ """Return a specific card back by using card back ID or slug."""
41
+ resource = f"/hearthstone/cardbacks/{id_or_slug}"
42
+ query_params = {"locale": locale}
43
+ return super().get_resource(resource, region, query_params)
44
+
45
+ # Decks
46
+
47
+ def get_deck(self, region, locale, **query_params):
48
+ """Find a deck by list of cards or code, including the hero."""
49
+ resource = "/hearthstone/deck"
50
+ query_params = {"locale": locale}
51
+ return super().get_resource(resource, region, query_params)
52
+
53
+ # Metadata
54
+
55
+ def get_metadata(self, region, locale):
56
+ """Return information about the categorization of cards."""
57
+ resource = "/hearthstone/metadata"
58
+ query_params = {"locale": locale}
59
+ return super().get_resource(resource, region, query_params)
60
+
61
+ def get_metadata_type(self, region, locale, type_id):
62
+ """Return information about just one type of metadata."""
63
+ resource = f"/hearthstone/metadata/{type_id}"
64
+ query_params = {"locale": locale}
65
+ return super().get_resource(resource, region, query_params)
@@ -0,0 +1 @@
1
+ """__init__.py file."""
@@ -0,0 +1,17 @@
1
+ """wow_api.py file."""
2
+ from .wow_game_data_api import WowGameDataApi
3
+ from .wow_profile_api import WowProfileApi
4
+
5
+
6
+ class WowApi:
7
+ """Wow API class.
8
+
9
+ Attributes:
10
+ client_id: A string client id supplied by Blizzard.
11
+ client_secret: A string client secret supplied by Blizzard.
12
+ """
13
+
14
+ def __init__(self, client_id, client_secret):
15
+ """Init WowApi."""
16
+ self.game_data = WowGameDataApi(client_id, client_secret)
17
+ self.profile = WowProfileApi(client_id, client_secret)