Table of Contents

Method GetItemById

Namespace
GuildWars2.Items
Assembly
GW2SDK.dll

GetItemById(int, Language?, MissingMemberBehavior, CancellationToken)

Retrieves an item by its ID.

public Task<(Item Value, MessageContext Context)> GetItemById(int itemId, Language? language = null, MissingMemberBehavior missingMemberBehavior = MissingMemberBehavior.Error, CancellationToken cancellationToken = default)

Parameters

itemId int

The item 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<(Item Value, MessageContext Context)>

A task that represents the API request.