User Routes
UserRouteInterface
Bases: ClientMixin
Source code in src/bungio/api/bungie/user.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
get_available_themes(auth=None)
async
Returns a list of all available user themes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
Optional[AuthData]
|
Authentication information. Required when users with a private profile are queried, or when Bungie feels like it |
None
|
Returns:
| Type | Description |
|---|---|
list[UserTheme]
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/api/bungie/user.py
81 82 83 84 85 86 87 88 89 90 91 92 93 | |
get_bungie_net_user_by_id(id, auth=None)
async
Loads a bungienet user by membership id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
int
|
The requested Bungie.net membership id. |
required |
auth
|
Optional[AuthData]
|
Authentication information. Required when users with a private profile are queried, or when Bungie feels like it |
None
|
Returns:
| Type | Description |
|---|---|
GeneralUser
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/api/bungie/user.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
get_credential_types_for_target_account(membership_id, auth=None)
async
Returns a list of credential types attached to the requested account
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
membership_id
|
int
|
The user's membership id |
required |
auth
|
Optional[AuthData]
|
Authentication information. Required when users with a private profile are queried, or when Bungie feels like it |
None
|
Returns:
| Type | Description |
|---|---|
list[GetCredentialTypesForAccountResponse]
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/api/bungie/user.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
get_membership_data_by_id(membership_id, membership_type, auth=None)
async
Returns a list of accounts associated with the supplied membership ID and membership type. This will include all linked accounts (even when hidden) if supplied credentials permit it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
membership_id
|
int
|
The membership ID of the target user. |
required |
membership_type
|
Union[BungieMembershipType, int]
|
Type of the supplied membership ID. |
required |
auth
|
Optional[AuthData]
|
Authentication information. Required when users with a private profile are queried, or when Bungie feels like it |
None
|
Returns:
| Type | Description |
|---|---|
UserMembershipData
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/api/bungie/user.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |
get_membership_data_for_current_user(auth)
async
Returns a list of accounts associated with signed in user. This is useful for OAuth implementations that do not give you access to the token response.
Requires Authentication.
Required oauth2 scopes: ReadBasicUserProfile
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
UserMembershipData
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/api/bungie/user.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
get_membership_from_hard_linked_credential(credential, cr_type, auth=None)
async
Gets any hard linked membership given a credential. Only works for credentials that are public (just SteamID64 right now). Cross Save aware.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
credential
|
str
|
The credential to look up. Must be a valid SteamID64. |
required |
cr_type
|
Union[BungieCredentialType, int]
|
The credential type. 'SteamId' is the only valid value at present. |
required |
auth
|
Optional[AuthData]
|
Authentication information. Required when users with a private profile are queried, or when Bungie feels like it |
None
|
Returns:
| Type | Description |
|---|---|
HardLinkedUserMembership
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/api/bungie/user.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
get_sanitized_platform_display_names(membership_id, auth=None)
async
Gets a list of all display names linked to this membership id but sanitized (profanity filtered). Obeys all visibility rules of calling user and is heavily cached.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
membership_id
|
int
|
The requested membership id to load. |
required |
auth
|
Optional[AuthData]
|
Authentication information. Required when users with a private profile are queried, or when Bungie feels like it |
None
|
Returns:
| Type | Description |
|---|---|
dict[BungieCredentialType, str]
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/api/bungie/user.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | |
search_by_global_name_post(data, page, auth=None)
async
Given the prefix of a global display name, returns all users who share that name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
UserSearchPrefixRequest
|
The required data for this request. |
required |
page
|
int
|
The zero-based page of results you desire. |
required |
auth
|
Optional[AuthData]
|
Authentication information. Required when users with a private profile are queried, or when Bungie feels like it |
None
|
Returns:
| Type | Description |
|---|---|
UserSearchResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/api/bungie/user.py
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
search_by_global_name_prefix(display_name_prefix, page, auth=None)
async
[OBSOLETE] Do not use this to search users, use SearchByGlobalNamePost instead.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
display_name_prefix
|
str
|
The display name prefix you're looking for. |
required |
page
|
int
|
The zero-based page of results you desire. |
required |
auth
|
Optional[AuthData]
|
Authentication information. Required when users with a private profile are queried, or when Bungie feels like it |
None
|
Returns:
| Type | Description |
|---|---|
UserSearchResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/api/bungie/user.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | |