This repository has been archived by the owner on May 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from trevorphillips/hearthstone
adding hearthstone
- Loading branch information
Showing
29 changed files
with
514 additions
and
621 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
.PHONY: devinstall clean lint | ||
|
||
devinstall: | ||
pip install -r requirements.txt | ||
|
||
clean: | ||
rm -rf dist | ||
find . -type d -name __pycache__ -delete | ||
find . -type f -name '*.py[co]' -delete | ||
rm -rf .coverage | ||
rm -rf .pytest_cache | ||
rm -rf build | ||
rm -rf dist | ||
rm -rf docs | ||
rm -rf htmlcov | ||
rm -rf .mypy_cache | ||
rm -rf python_blizzardapi.egg-info | ||
rm -rf .coverage | ||
rm -rf docs | ||
rm -rf .pytest_cache | ||
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete | ||
|
||
lint: | ||
black . -l 200 && black . -l 79 | ||
bandit blizzardapi | ||
mypy blizzardapi | ||
pydocstyle blizzardapi | ||
pylint blizzardapi --exit-zero |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
"""__init__.py file.""" | ||
from requests.exceptions import * # noqa | ||
|
||
from .blizzard_api import BlizzardApi # noqa | ||
from .exceptions import BlizzardApiRequestException # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""__init__.py file.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
"""battlenet_api.py file.""" | ||
from .battlenet_oauth_api import BattlenetOauthApi | ||
|
||
|
||
class BattlenetApi: | ||
"""Battle.net API class. | ||
Attributes: | ||
client_id: A string client id supplied by Blizzard. | ||
client_secret: A string client secret supplied by Blizzard. | ||
""" | ||
|
||
def __init__(self, client_id, client_secret): | ||
"""Init BattlenetApi.""" | ||
self.oauth = BattlenetOauthApi(client_id, client_secret) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
"""blizzard_api.py file.""" | ||
from .battlenet.battlenet_api import BattlenetApi | ||
from .diablo3.diablo3_api import Diablo3Api | ||
from .hearthstone.hearthstone_api import HearthstoneApi | ||
from .wow.wow_api import WowApi | ||
|
||
|
||
class BlizzardApi: | ||
"""Blizzard API class. | ||
Attributes: | ||
client_id: A string client id supplied by Blizzard. | ||
client_secret: A string client secret supplied by Blizzard. | ||
""" | ||
|
||
def __init__(self, client_id, client_secret): | ||
"""Init BlizzardApi.""" | ||
self.battlenet = BattlenetApi(client_id, client_secret) | ||
self.diablo3 = Diablo3Api(client_id, client_secret) | ||
self.hearthstone = HearthstoneApi(client_id, client_secret) | ||
self.wow = WowApi(client_id, client_secret) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""__init__.py file.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
"""diablo3_api.py file.""" | ||
from .diablo3_community_api import Diablo3CommunityApi | ||
from .diablo3_game_data_api import Diablo3GameDataApi | ||
|
||
|
||
class Diablo3Api: | ||
"""Diablo3 API class. | ||
Attributes: | ||
client_id: A string client id supplied by Blizzard. | ||
client_secret: A string client secret supplied by Blizzard. | ||
""" | ||
|
||
def __init__(self, client_id, client_secret): | ||
"""Init Diablo3Api.""" | ||
self.community = Diablo3CommunityApi(client_id, client_secret) | ||
self.game_data = Diablo3GameDataApi(client_id, client_secret) |
Oops, something went wrong.