File tree Expand file tree Collapse file tree 4 files changed +41
-2
lines changed
Expand file tree Collapse file tree 4 files changed +41
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ def read(f_name):
99
1010setup (
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" ,
Original file line number Diff line number Diff line change 1010
1111
1212class 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.
Original file line number Diff line number Diff line change 1+ from .XPA import XPA
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments