Skip to main content

AchievementApiClient

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

Online client for a user's achievements and action stats stored by Alta's web API, which no longer answers. Reached as ApiAccess.ApiClient.AchievementClient.

Constructors​

1 private and internal constructor
MemberWhat it is
internal AchievementApiClient(IHighLevelApiClientManager clientManager)Creates an AchievementApiClient from clientManager.

Fields​

3 private and internal fields
MemberWhat it is
private UpdateActionStatRequest actionStatRequestLast request built for the list overload of UpdateActionStatForUserAsync.
private UpdateAchievementRequest updateAchievementRequestLast request built by UpdateAchievementForUserAsync.
private UpdateActionStatRequest updateActionStatRequestLast request built for the single stat overload of UpdateActionStatForUserAsync.

Methods​

MemberWhat it is
async Task<IEnumerable<uint>> GetAchievementsForUserAsync(int userId)Gets the hashes of the user's completed achievements, or an empty list if the API returns none.
async Task<IEnumerable<StatProgress>> GetActionStatsForUserAsync(int userId)Gets the user's action stat progress, or an empty list if the API returns none.
Task UpdateAchievementForUserAsync(int userId, uint achievementHash, bool isCompleted)Sets one achievement (by hash) as completed or not for the user.
Task UpdateActionStatForUserAsync(int userId, uint statHash, float newProgress)Sets the progress of one stat by hash, or of a list of stats at once.
Task UpdateActionStatForUserAsync(int userId, List<StatProgress> stats)Sets the progress of one stat by hash, or of a list of stats at once.