add example from pypi and testing

This commit is contained in:
tonydero 2024-12-23 08:02:06 -07:00
commit a5312a4625

16
example.py Normal file
View File

@ -0,0 +1,16 @@
from blizzardapi2 import BlizzardApi
api_client = BlizzardApi("a79bae348867427690ca6df9903e4af0", "8l1KhVr1DkcqpXQl454WZmtlN3LvgBO5")
# Unprotected API endpoint
categories_index = api_client.wow.game_data.get_achievement_categories_index("us", "en_US")
# Protected API endpoint
# summary = api_client.wow.profile.get_account_profile_summary("us", "en_US", "access_token")
# Wow Classic endpoint
connected_realms_index = api_client.wow.game_data.get_connected_realms_index("us", "en_US", is_classic=True)
print(categories_index)
# print(summary)
print(connected_realms_index)