Account provider¶
pythonxbox.api.provider.account.AccountProvider(client)
¶
Bases: BaseProvider
Source code in src/pythonxbox/api/provider/baseprovider.py
BASE_URL_USER_MGT = 'https://user.mgt.xboxlive.com'
class-attribute
instance-attribute
¶
BASE_URL_ACCOUNT = 'https://accounts.xboxlive.com'
class-attribute
instance-attribute
¶
HEADERS_USER_MGT = {'x-xbl-contract-version': '1'}
class-attribute
instance-attribute
¶
HEADERS_ACCOUNT = {'x-xbl-contract-version': '2'}
class-attribute
instance-attribute
¶
claim_gamertag(xuid, gamertag, **kwargs)
async
¶
Claim gamertag
XLE error codes
400 - Bad API request 401 - Unauthorized 409 - Gamertag unavailable 429 - Too many requests 200 - Gamertag available
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xuid
|
int
|
Your xuid as integer |
required |
gamertag
|
str
|
Desired gamertag |
required |
Returns: ClaimGamertagResult
Source code in src/pythonxbox/api/provider/account/__init__.py
change_gamertag(xuid, gamertag, preview=False, **kwargs)
async
¶
Change your gamertag.
XLE error codes
200 - success 1020 - No free gamertag changes available
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xuid
|
int
|
Your Xuid as integer |
required |
gamertag
|
str
|
Desired gamertag name |
required |
preview
|
bool
|
Preview the change |
False
|
Returns: ChangeGamertagResult