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.
- Listed in Alta.Api.Client
- Inherits or implements
HighLevelApiClientBase,IAchievementClient
Constructors
1 private and internal constructor
| Member | What it is |
|---|---|
internal AchievementApiClient(IHighLevelApiClientManager clientManager) | Creates an AchievementApiClient from clientManager. |
Fields
3 private and internal fields
| Member | What it is |
|---|---|
private UpdateActionStatRequest actionStatRequest | Last request built for the list overload of UpdateActionStatForUserAsync. |
private UpdateAchievementRequest updateAchievementRequest | Last request built by UpdateAchievementForUserAsync. |
private UpdateActionStatRequest updateActionStatRequest | Last request built for the single stat overload of UpdateActionStatForUserAsync. |
Methods
| Member | What 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. |