Method GetGameById
- Namespace
- GuildWars2.Pvp
- Assembly
- GW2SDK.dll
GetGameById(string, string?, MissingMemberBehavior, CancellationToken)
Retrieves a PvP game by its ID. This endpoint is only accessible with a valid access token.
public Task<(Game Value, MessageContext Context)> GetGameById(string gameId, string? accessToken, MissingMemberBehavior missingMemberBehavior = MissingMemberBehavior.Error, CancellationToken cancellationToken = default)
Parameters
gameId
stringThe game ID.
accessToken
stringAn API key or subtoken.
missingMemberBehavior
MissingMemberBehaviorThe desired behavior when JSON contains unexpected members.
cancellationToken
CancellationTokenA token to cancel the request.
Returns
- Task<(Game Value, MessageContext Context)>
A task that represents the API request.