People provider¶
People - Access friendlist from own profiles and others
pythonxbox.api.provider.people.PeopleProvider(client)
¶
Bases: RateLimitedProvider
Initialize Baseclass, set 'Accept-Language' header from client instance
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client (
|
class: |
required |
Source code in src/pythonxbox/api/provider/people/__init__.py
SOCIAL_URL = 'https://social.xboxlive.com'
class-attribute
instance-attribute
¶
HEADERS_SOCIAL = {'x-xbl-contract-version': '2'}
class-attribute
instance-attribute
¶
PEOPLE_URL = 'https://peoplehub.xboxlive.com'
class-attribute
instance-attribute
¶
HEADERS_PEOPLE = {'x-xbl-contract-version': '7', 'Accept-Language': 'overwrite in __init__'}
class-attribute
instance-attribute
¶
SEPERATOR = ','
class-attribute
instance-attribute
¶
RATE_LIMITS = {'burst': 10, 'sustain': 30}
class-attribute
instance-attribute
¶
client
instance-attribute
¶
get_friends_own(decoration_fields=None, **kwargs)
async
¶
Get friendlist of own profile
Returns:
| Type | Description |
|---|---|
PeopleResponse
|
class: |
Source code in src/pythonxbox/api/provider/people/__init__.py
get_friends_by_xuid(xuid, decoration_fields=None, **kwargs)
async
¶
Get friendlist of own profile
Returns:
| Type | Description |
|---|---|
PeopleResponse
|
class: |
Source code in src/pythonxbox/api/provider/people/__init__.py
get_friends_own_batch(xuids, decoration_fields=None, **kwargs)
async
¶
Get friends metadata by providing a list of XUIDs
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xuids
|
list[str]
|
List of XUIDs |
required |
Returns:
| Type | Description |
|---|---|
PeopleResponse
|
class: |
Source code in src/pythonxbox/api/provider/people/__init__.py
get_friend_recommendations(decoration_fields=None, **kwargs)
async
¶
Get recommended friends
Returns:
| Type | Description |
|---|---|
PeopleResponse
|
class: |
Source code in src/pythonxbox/api/provider/people/__init__.py
get_friends_summary_own(**kwargs)
async
¶
Get friendlist summary of own profile
Returns:
| Type | Description |
|---|---|
PeopleSummaryResponse
|
class: |
Source code in src/pythonxbox/api/provider/people/__init__.py
get_friends_summary_by_xuid(xuid, **kwargs)
async
¶
Get friendlist summary of user by xuid
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xuid
|
str
|
XUID to request summary from |
required |
Returns:
| Type | Description |
|---|---|
PeopleSummaryResponse
|
class: |
Source code in src/pythonxbox/api/provider/people/__init__.py
get_friends_summary_by_gamertag(gamertag, **kwargs)
async
¶
Get friendlist summary of user by gamertag
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gamertag
|
str
|
Gamertag to request friendlist from |
required |
Returns:
| Type | Description |
|---|---|
PeopleSummaryResponse
|
class: |