Skip to content

Releases: sliekens/gw2sdk

v3.1.0

08 Feb 16:10

Choose a tag to compare

Release Notes - v3.1.0

This release adds support for fashion template expansion items.

Items

  • Added new item type FashionTemplateExpansion

Full Changelog: v3.0.0...v3.1.0

v3.0.0

18 Jan 23:19

Choose a tag to compare

Release Notes - v3.0.0

This major release includes a significant overhaul of the library's project structure, collection types, and API consistency. It also introduces structural equality for API data collections and enhances Native AOT support.

Breaking Changes

Project Structure

  • Renamed C# projects from GW2SDK to GuildWars2 to align with the root namespace.

Collections

  • Immutable Value Collections: All API data collections (lists, sets, and dictionaries) now use new immutable types that implement structural equality (meaning two collections are equal if their contents are equal).
    • Replaced IReadOnlyList<T>, List<T>, T[], etc., with IImmutableValueList<T>.
    • Replaced ISet<T>, HashSet<T>, etc., with IImmutableValueSet<T>.
    • Replaced IReadOnlyDictionary<K, V>, etc., with IImmutableValueDictionary<K, V>.

API Consistency & Renames

  • Attributes: Attribute has been renamed to AttributeValue.
  • Back Items: Backpack has been renamed to BackItem across all related types (BackItem, BackItemRecipe, BackItemSkin).
  • Equipment Slots: EquipmentSlot.Backpack has been renamed to Back.
  • Miniatures: Miniature has been renamed to MiniatureItem.
  • Mount Skins: Removed obsolete property MountSkin.Mount.
  • Achievements: ItemReward has been moved to the GuildWars2.Hero.Achievements.Rewards namespace.
  • Guilds: Several types have been renamed for clarity and accuracy:
    • QueueWorkshopRestoration
    • ClaimableWvwObjectiveUpgrade
    • UnlockGuildUnlocker
    • DecorationGuildDecoration
    • ConsumableGuildConsumable
    • BoostGuildBoost
    • HubGuildInitiativeOffice
    • BankBagGuildBankUpgrade
    • AccumulatingCurrencyAetheriumUpgrade
  • Unlockers: MagicDoorSkinUnlocker has been renamed to ConjuredDoorwayUnlocker.
  • Casing: Aligned casing with the game for Longbow (was LongBow) and Short Bow (was Shortbow).

Account

  • WvW Rank: AccountSummary.WvwRank has been removed (use AccountSummary.Wvw.Rank instead).
  • Professions: AccountStats.Professions now uses Extensible<ProfessionName>.

Authorization

  • Removed obsolete subtoken creation methods.

URLs

  • Properties ending in Href (returning string) have been replaced with properties ending in Url (returning Uri). For example, IconHref is now IconUrl.

Items and Item Stats

  • Amulet.Attributes and SelectedAttributeCombination.Attributes now use Extensible<TEnum> for better future-proofing.

Markdown Parsing

  • Markdown parser classes are now static.
  • Nodes now use immutable collection types.

Improvements

  • Structural Equality: API collections now support structural equality by default, making it easier to compare data returned from different API calls.
  • Native AOT: Improved support for Ahead-of-Time compilation by testing with JsonSerializerIsReflectionEnabledByDefault = false.
  • Metadata: Added missing DataTransferObject attributes to relevant types.
  • Documentation: Modernized the project README and User Guide.

Dependency Updates

  • Updated to latest .NET SDK features.
  • Updated various dependencies including TUnit, Polyfill, and Microsoft.Extensions.

Full Changelog: v2.9.0...v3.0.0

v2.9.1

03 Jan 15:22

Choose a tag to compare

Highlights

Maintenance release in preparation for v3.

Remember to check #199, this will be one of the last v2 releases. Everything marked obsolete in v2 will be removed in v3.

Masteries

  • Added System.Uri-typed property MasteryTrack.BackgroundUrl to replace string-typed property BackgroundHref
  • Marked property MasteryTrack.BackgroundHref obsolete

Full Changelog: v2.9.0...v2.9.1
Previous release notes: https://github.com/sliekens/gw2sdk/releases/tag/v2.9.0

v2.9.0

20 Nov 17:30

Choose a tag to compare

Highlights

The package now officially supports .NET 10.

The API was updated with missing mastery region names, the new names were added to the enum.

There is now a fluent builder for creating scoped subtokens (URL + permission + expiration).

Remember to check #199, this will be one of the last v2 releases. Everything marked obsolete in v2 will be removed in v3.

Framework Targets

  • Added target framework net10.0. Older targets remain: net9.0, net8.0, netstandard2.0, net462.

Authorization

The TokenClient.CreateSubtoken method had too many optional arguments, causing confusion. The confusing overload has been made obsolete and superseded by a method with a fluent builder pattern. The new builder adds supports for Extensible<Permission>.

  • Added SubtokenOptionsBuilder to simplify creating subtokens with scoped permissions, allowed URLs and optional absolute expiration.
  • Added overload TokenClient.CreateSubtoken(string accessToken, Action<SubtokenOptionsBuilder> configureCallback, ...) for fluent subtoken configuration.
  • Added WithPermissions(IEnumerable<Extensible<Permission>>) overload to support extensible enum permissions in the builder.

Example:

Gw2Client gw2Client = new Gw2Client(new HttpClient());
string accessToken = "...";
(CreatedSubtoken createdSubtoken, MessageContext context) = await gw2Client.Tokens.CreateSubtoken(
    accessToken,
    subtoken => subtoken
        .WithPermissions(TokenInfo.AllPermissions)
        .WithAbsoluteExpiration(DateTimeOffset.UtcNow.AddDays(1))
        .WithAllowedUrls([new Uri("/v2/account"), new Uri("/v2/tokeninfo"), new Uri("/v2/characters")]),
    cancellationToken: CancellationToken.None
);

Masteries

  • Added enum member MasteryRegionName.Wild (Janthir Wilds mastery region).
  • Added enum member MasteryRegionName.Magic (Visions of Eternity mastery region).

Misc

  • Replaced PolySharp source generators with Polyfill for legacy targets (internal improvement).
  • Replaced xUnit.net with TUnit. In a future phase, tests will be compiled with Native AOT to ensure Native AOT readiness.

Full Changelog: v2.8.1...v2.9.0
Previous release notes: https://github.com/sliekens/gw2sdk/releases/tag/v2.8.1

v2.8.1

18 Oct 09:11

Choose a tag to compare

Highlights

Maintenance release with a fix for Revenant legends and improved compatibility with older TFMs.

Remember to check #199, this will be one of the last v2 releases. Everything marked obsolete in v2 will be removed in v3.

Characters and Build Storage

  • Fixed a crash when encountering Legend7 or Legend8 in player data

Misc

  • Removed System.Text.Json as an explicit target from .NET 8.0; instead, use the version provided by the runtime.
  • In practice, this means gw2sdk no longer forces you to upgrade to System.Text.Json 8.x.x to 9.x.x if you are on .NET 8
  • Downgraded System.Text.Json minimum version requirement for .NETFramework / .NETStandard targets from 9.0.8 to 6.0.11

Full Changelog: v2.8.0...v2.8.1
Previous release notes: https://github.com/sliekens/gw2sdk/releases/tag/v2.8.0

v2.8.0

07 Sep 10:26
19e00e7

Choose a tag to compare

Highlights

Maintenance release with a few important API updates.

Remember to check #199, this will be one of the last v2 releases. Everything marked obsolete in v2 will be removed in v3.

Items

  • Added type MagicDoorSkinUnlocker

Mount skins and types

  • Added property Mount.UId which is a GUID that uniquely identifies the mount type
  • Added property MountSkin.MountId which is a reference to Mount.UId
  • Marked property MountSkin.Mount as obsolete
    • it can still be used if you suppress the warning, but unrecognized GUIDs of the future are treated as Unknown
    • recommendation: switch to MountId for cross-referencing mount skins with mount types

Skills

  • Added LargeBundle and Nothing to enum WeaponType, used in build template and chat link objects
  • Added remarks that Skill.Name and Skill.Description can be empty.

Full Changelog: v2.7.0...v2.8.0
Previous release notes: https://github.com/sliekens/gw2sdk/releases/tag/v2.7.0

v2.7.0

10 Aug 15:58

Choose a tag to compare

Highlights

Maintenance release, nothing super fancy, some code quality improvement, a few new helper methods and some deprecations.

For this release, a lot of additional .NET code analysis rules were enabled, and ReSharper was replaced with dotnet-format and Roslynator (FOSS alternative). There are some new methods and some deprecated methods as a result, to comply with these new diagnostics.

I also started using Microsoft.CodeAnalysis.PublicApiAnalyzers to keep better track of added and removed APIs. You can have a look at GW2SDK/PublicAPI to see all current and planned future APIs.

Remember to check #199, this will be one of the last v2 releases. Everything marked obsolete in v2 will be removed in v3.

New features

Coin:

  • Overloaded operators now have friendly methods alternative
  • e.g., Coin c = Coin.FromInt32(1000).Add(50)

Tokens:

  • Added property TokenInfo.AllPermissions

Markup converters:

  • MarkupLexer.Tokenize instance method is now static
  • MarkupParser.Parse instance method is now static
  • MarkupTextConverter.Convert instance method is now static
  • MarkupHtmlConverter.Convert instance method is now static

Misc:

  • Added static method Extensible<TEnum>.FromString(string)
  • Added static method Extensible<TEnum>.ToExtensible(TEnum)
  • Enums now have a None default member if they didn't already have a default
    • ⚠️ updated your usages of Enum.GetNames and Enum.GetValues to handle the None value
  • Added more guards against null in public methods

Bug fixes

Build templates:

  • Fixed ranger pet underwater skills getting mixed up with terrestrial skills

Chat links:

  • Fixed an exception thrown by BuildTemplateLink.ToString when generating a revenant build chat link without active legends

Misc:

  • Added missing CLSCompliant attributes
  • Fix HttpRequestMessage not being disposed

Full Changelog: v2.6.0...v2.7.0
Previous release notes: https://github.com/sliekens/gw2sdk/releases/tag/v2.6.0

v2.6.0

29 Jul 19:27

Choose a tag to compare

Highlights

The API for collection achievements now provides hints for where to obtain the items, skins and minis.

A new API was added to retrieve GW2 logos.

Fixed PvP amulet names and descriptions always being returned in English.

New features

Achievements:

  • Added property AchievementBit.Text
  • Removed property AchievementTextBit.Text which is now inherited from the base type

Logos:

  • Added property Gw2Client.Logos which provides query methods for logos

Bug fixes

PvP:

  • Method GetAmulets now honors the language argument

Misc:

  • Fixed incorrect parsing of Link response headers when GW2SDK is used with Mono on Linux
  • Fixed read-only JSON elements being copied around instead of getting passed by reference, possibly negatively affecting performance
    • (A quick benchmark hinted at this being an improvement but couldn't tell for sure.)
  • Added missing doc comments

Full Changelog: v2.5.2...v2.6.0
Previous release notes: https://github.com/sliekens/gw2sdk/releases/tag/v2.5.2

v2.5.2

23 Jun 22:31

Choose a tag to compare

Fixed JSON reading errors for the new PvP seasons structure.

(PvP seasons are now repeating on a schedule. Start/end dates are currently only available for the active season. This release fixes a crash when encountering a season without start/end dates. Missing values are now replaced with DateTime.MinValue.)

Full Changelog: v2.5.1...v2.5.2
Previous release notes: https://github.com/sliekens/gw2sdk/releases/tag/v2.5.1

v2.5.1

07 Jun 09:59

Choose a tag to compare

Fixed a regression introduced in v2.4.0 where Effect JSON structures from versions <2.4.0 cannot be deserialized.

Full Changelog: v2.5.0...v2.5.1
Previous release notes: https://github.com/sliekens/gw2sdk/releases/tag/v2.5.0