Skip to content

Commit e66ff2d

Browse files
committed
Fixed failed building (missing classes)
1 parent 4334e27 commit e66ff2d

File tree

4 files changed

+41
-2
lines changed

4 files changed

+41
-2
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def read(f_name):
99

1010
setup(
1111
name="xbox-python-api",
12-
version="0.1.2.2",
12+
version="0.1.2.3",
1313
url="https://github.com/Rarmash/Xbox-Python-API",
1414
author="Rarmash",
1515
description="Xbox API library",

xpa/XPA.py

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,54 @@
1010

1111

1212
class XPA:
13+
"""
14+
Xbox API class
15+
"""
1316
def __init__(self, api_key):
17+
"""
18+
Initialize the XPA class
19+
20+
Args:
21+
api_key (str): API key for the XPA API.
22+
23+
Returns:
24+
None
25+
"""
1426
self.api_key = api_key
1527
self.url = URLs()
1628

1729
def _make_request(self, endpoint):
30+
"""
31+
Make a request to the specified endpoint
32+
33+
Args:
34+
endpoint (str): endpoint to make the request to.
35+
36+
Returns:
37+
requests.models.Response: response from the request.
38+
"""
1839
headers = {'x-authorization': self.api_key}
1940
return requests.get(endpoint, headers=headers)
2041

2142
def _find_setting_by_id(self, settings, setting_id):
43+
"""
44+
Find a setting by its id
45+
46+
Args:
47+
settings (list): list of settings
48+
setting_id (str): id of the setting to find
49+
50+
Returns:
51+
str: value of the setting
52+
"""
2253
for setting in settings:
2354
if setting['id'] == setting_id:
2455
return setting['value']
2556
return None
2657

2758
def get_account_info_xuid(self, xuid: str) -> ACCOUNT_INFO_XUID:
28-
"""Get someone's profile information
59+
"""
60+
Get someone's profile information
2961
3062
Args:
3163
xuid (str): xuid of specified user.

xpa/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .XPA import XPA

xpa/classes/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from .ACCOUNT_INFO_GAMERTAG import ACCOUNT_INFO_GAMERTAG
2+
from .ACCOUNT_INFO_XUID import ACCOUNT_INFO_XUID
3+
from .CLUB_DETAILS import CLUB_DETAILS
4+
from FRIEND_INFO_GAMERTAG import FRIEND_INFO_GAMERTAG
5+
from PLAYER_SUMMARY import PLAYER_SUMMARY
6+
from XUID_PRESENCE import XUID_PRESENCE

0 commit comments

Comments
 (0)