Skip to main content

OfflineUserApiClient

A class in Alta.Api.Client, Alta.Api.Client.HighLevel.

Offline stand-in for the user client, created on offline login from the stored access token. Simple calls succeed locally; account and preset calls throw OfflineException.

Constructors​

1 private and internal constructor
MemberWhat it is
internal OfflineUserApiClient(UserInfoWithPermissions loggedInUserInfo, IHighLevelApiClient highLevelClient)Creates an OfflineUserApiClient from loggedInUserInfo and highLevelClient.

Fields​

1 private and internal field
MemberWhat it is
private readonly IHighLevelApiClient highLevelClientThe offline client that owns this one, used by Logout.

Properties​

MemberWhat it is
UserInfoWithPermissions LoggedInUserInfo { get; set; }The user read from the stored access token.

Methods​

MemberWhat it is
Task ChangeEmail(string email)Throws OfflineException.
Task ChangeUsernameAsync(string newUsername, string passwordHash)Changes the username on LoggedInUserInfo only.
Task<UserPresetDataInfo> CreateCosmeticsPreset(int presetId, uint[] data, int byteSize)Throws OfflineException.
Task DeleteCosmeticPreset(int presetId)Throws OfflineException.
Task<IEnumerable<UserPresetDataInfo>> GetAllCosmeticsPresets()Throws OfflineException.
Task<MembershipStatusResponse> GetMembershipStatus(int userIdentifer)Throws OfflineException.
Task<PersonalUserInfoResponse> GetPersonalUserInfo(int userId)Throws OfflineException.
Task<UserInfo> GetUserInfoAsync(int userId)Makes up a user: by ID with the name Offline, or by name with ID -1.
Task<UserInfo> GetUserInfoAsync(string username)Makes up a user: by ID with the name Offline, or by name with ID -1.
Task<UserInfoWithPermissions> GetUserInfoWithPermissionsAsync(int userId)Throws OfflineException.
Task<UserStatistics> GetUserStatisticsAsync(int userIdentifier)Throws OfflineException.
Task GiveUserRoleAsync(int userIdentifer, AssignableRoles role)Does nothing.
Task<bool> IsUserVerifiedAsync()Always true.
void Logout()Logs the offline client out.
Task RefreshLoginAsync()Does nothing.
Task RequestUserVerificationEmailAsync(string email)Does nothing.
Task UpdatePasswordAsync(string oldPasswordHash, string newPasswordHash)Does nothing.
Task ValidateEmail(string email)Throws OfflineException.
Task<string> ValidateUsername(string username)Throws OfflineException.
Task VerifyUsersMemberShip(int userId)Throws OfflineException.