Releases: sliekens/gw2sdk
v3.1.0
v3.0.0
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
GW2SDKtoGuildWars2to 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., withIImmutableValueList<T>. - Replaced
ISet<T>,HashSet<T>, etc., withIImmutableValueSet<T>. - Replaced
IReadOnlyDictionary<K, V>, etc., withIImmutableValueDictionary<K, V>.
- Replaced
API Consistency & Renames
- Attributes:
Attributehas been renamed toAttributeValue. - Back Items:
Backpackhas been renamed toBackItemacross all related types (BackItem,BackItemRecipe,BackItemSkin). - Equipment Slots:
EquipmentSlot.Backpackhas been renamed toBack. - Miniatures:
Miniaturehas been renamed toMiniatureItem. - Mount Skins: Removed obsolete property
MountSkin.Mount. - Achievements:
ItemRewardhas been moved to theGuildWars2.Hero.Achievements.Rewardsnamespace. - Guilds: Several types have been renamed for clarity and accuracy:
Queue→WorkshopRestorationClaimable→WvwObjectiveUpgradeUnlock→GuildUnlockerDecoration→GuildDecorationConsumable→GuildConsumableBoost→GuildBoostHub→GuildInitiativeOfficeBankBag→GuildBankUpgradeAccumulatingCurrency→AetheriumUpgrade
- Unlockers:
MagicDoorSkinUnlockerhas been renamed toConjuredDoorwayUnlocker. - Casing: Aligned casing with the game for
Longbow(wasLongBow) andShort Bow(wasShortbow).
Account
- WvW Rank:
AccountSummary.WvwRankhas been removed (useAccountSummary.Wvw.Rankinstead). - Professions:
AccountStats.Professionsnow usesExtensible<ProfessionName>.
Authorization
- Removed obsolete subtoken creation methods.
URLs
- Properties ending in
Href(returningstring) have been replaced with properties ending inUrl(returningUri). For example,IconHrefis nowIconUrl.
Items and Item Stats
Amulet.AttributesandSelectedAttributeCombination.Attributesnow useExtensible<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
DataTransferObjectattributes 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
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 propertyMasteryTrack.BackgroundUrlto replacestring-typed propertyBackgroundHref - Marked property
MasteryTrack.BackgroundHrefobsolete
Full Changelog: v2.9.0...v2.9.1
Previous release notes: https://github.com/sliekens/gw2sdk/releases/tag/v2.9.0
v2.9.0
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
SubtokenOptionsBuilderto 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
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
Legend7orLegend8in 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
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.UIdwhich is a GUID that uniquely identifies the mount type - Added property
MountSkin.MountIdwhich is a reference toMount.UId - Marked property
MountSkin.Mountas obsolete- it can still be used if you suppress the warning, but unrecognized GUIDs of the future are treated as
Unknown - recommendation: switch to
MountIdfor cross-referencing mount skins with mount types
- it can still be used if you suppress the warning, but unrecognized GUIDs of the future are treated as
Skills
- Added
LargeBundleandNothingto enumWeaponType, used in build template and chat link objects - Added remarks that
Skill.NameandSkill.Descriptioncan 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
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.Tokenizeinstance method is now staticMarkupParser.Parseinstance method is now staticMarkupTextConverter.Convertinstance method is now staticMarkupHtmlConverter.Convertinstance method is now static
Misc:
- Added static method
Extensible<TEnum>.FromString(string) - Added static method
Extensible<TEnum>.ToExtensible(TEnum) - Enums now have a
Nonedefault member if they didn't already have a default⚠️ updated your usages ofEnum.GetNamesandEnum.GetValuesto handle theNonevalue
- Added more guards against
nullin 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.ToStringwhen generating a revenant build chat link without active legends
Misc:
- Added missing CLSCompliant attributes
- Fix
HttpRequestMessagenot 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
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.Textwhich is now inherited from the base type
Logos:
- Added property
Gw2Client.Logoswhich provides query methods for logos
Bug fixes
PvP:
- Method
GetAmuletsnow honors thelanguageargument
Misc:
- Fixed incorrect parsing of
Linkresponse 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
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
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