IUserApiClient
An interface in Alta.Api.Client, Alta.Api.Client.HighLevel.
The user account part of Alta's web API: user lookups, verification, roles and cosmetic presets. Reached through ApiAccess.ApiClient.UserClient. Every method except Logout makes a web request.
- Listed in Alta.Api.Client
- Derived types
OfflineUserApiClient,UserApiClient
Properties
| Member | What it is |
|---|---|
UserInfoWithPermissions LoggedInUserInfo { get; set; } | The logged-in user's info and permissions. Set on login, null when logged out. No request. |
Methods
| Member | What it is |
|---|---|
Task ChangeEmail(string email) | Requests an email change for the logged-in user. |
Task ChangeUsernameAsync(string newUsername, string passwordHash) | Requests a username change, confirmed with the password hash. |
Task<UserPresetDataInfo> CreateCosmeticsPreset(int presetId, uint[] data, int byteSize) | Saves a cosmetic preset (packed data and its byte size) under a preset id. |
Task DeleteCosmeticPreset(int presetId) | Deletes a saved cosmetic preset by id. |
Task<IEnumerable<UserPresetDataInfo>> GetAllCosmeticsPresets() | Fetches the logged-in user's saved cosmetic presets. |
Task<MembershipStatusResponse> GetMembershipStatus(int userIdentifer) | Fetches a user's membership (subscription) status. |
Task<PersonalUserInfoResponse> GetPersonalUserInfo(int userIdentifier) | Fetches a user's personal info response by user id. |
Task<UserInfo> GetUserInfoAsync(int userId) | Fetches a user's public info, by user id or by username. |
Task<UserInfo> GetUserInfoAsync(string username) | Fetches a user's public info, by user id or by username. |
Task<UserInfoWithPermissions> GetUserInfoWithPermissionsAsync(int userId) | Fetches a user's info along with their permissions. |
Task<UserStatistics> GetUserStatisticsAsync(int userIdentifier) | Fetches a user's statistics. |
Task GiveUserRoleAsync(int userIdentifer, AssignableRoles role) | Assigns one of the assignable roles to a user. |
Task<bool> IsUserVerifiedAsync() | Asks whether the logged-in user's email is verified, and marks the local info verified if so. |
void Logout() | Clears the low-level login tokens. |
Task RefreshLoginAsync() | Refreshes the login tokens. |
Task RequestUserVerificationEmailAsync(string email) | Asks for a verification email to be sent to the given address. |
Task UpdatePasswordAsync(string oldPasswordHash, string newPasswordHash) | Changes the password, from the old hash to the new hash. |
Task ValidateEmail(string email) | Asks the API whether an email address is acceptable. |
Task<string> ValidateUsername(string username) | Asks the API whether a username is acceptable, returning its answer as a string. |
Task VerifyUsersMemberShip(int userId) | Asks the API to verify a user's membership. |
Used in
Members of other types that take, return or hold a IUserApiClient:
HighLevelApiClient.LoginAsync, HighLevelApiClient.LoginViaOauth, HighLevelApiClient.LoginWithEmailAsync, HighLevelApiClient.LoginWithOculus, HighLevelApiClient.LoginWithPico, HighLevelApiClient.LoginWithRefreshTokenAsync, HighLevelApiClient.LoginWithTokens, HighLevelApiClient.UserClient, IHighLevelApiClient.LoginAsync, IHighLevelApiClient.LoginViaOauth, IHighLevelApiClient.LoginWithEmailAsync, IHighLevelApiClient.LoginWithOculus, IHighLevelApiClient.LoginWithPico, IHighLevelApiClient.LoginWithRefreshTokenAsync, IHighLevelApiClient.LoginWithTokens, IHighLevelApiClient.UserClient, OfflineHighLevelApiClient.Login, OfflineHighLevelApiClient.LoginAsync, OfflineHighLevelApiClient.LoginViaOauth, OfflineHighLevelApiClient.LoginWithEmailAsync, OfflineHighLevelApiClient.LoginWithOculus, OfflineHighLevelApiClient.LoginWithPico, OfflineHighLevelApiClient.LoginWithRefreshTokenAsync, OfflineHighLevelApiClient.LoginWithTokens, OfflineHighLevelApiClient.UserClient.