Method GetGuildById
- Namespace
- GuildWars2.Guilds
- Assembly
- GW2SDK.dll
GetGuildById(string, string?, MissingMemberBehavior, CancellationToken)
Retrieves a guild by its ID. This endpoint is only accessible with a valid access token and the associated account must be a member of the guild.
public Task<(Guild Value, MessageContext Context)> GetGuildById(string guildId, string? accessToken, MissingMemberBehavior missingMemberBehavior = MissingMemberBehavior.Error, CancellationToken cancellationToken = default)
Parameters
guildId
stringThe guild 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<(Guild Value, MessageContext Context)>
A task that represents the API request.