Table of Contents

Method GetAchievementById

Namespace
GuildWars2.Hero.Achievements
Assembly
GW2SDK.dll

GetAchievementById(int, Language?, MissingMemberBehavior, CancellationToken)

Retrieves an achievement by its ID.

public Task<(Achievement Value, MessageContext Context)> GetAchievementById(int achievementId, Language? language = null, MissingMemberBehavior missingMemberBehavior = MissingMemberBehavior.Error, CancellationToken cancellationToken = default)

Parameters

achievementId int

The achievement ID.

language Language

The language to use for descriptions.

missingMemberBehavior MissingMemberBehavior

The desired behavior when JSON contains unexpected members.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<(Achievement Value, MessageContext Context)>

A task that represents the API request.