Skip to content

Releases: sliekens/gw2sdk

v1.0.0

20 May 18:07
Compare
Choose a tag to compare

I am thrilled to announce the first official release of GW2SDK!

The SDK now offers a robust set of features for interacting with the Guild Wars 2 API and game client. All planned features are now complete, reviewed, tested, documented and optimized for extreme performance, without sacrificing ease of use.

Highlights

I added support for weapon skill overrides to chat links for build templates. This is used for Ranger builds that utilize Unleashed hammer skills.

I removed unnecessary NuGet dependencies, which could otherwise pollute your solution with unwanted packages. The only required dependency is System.Text.Json. For legacy .NET Framework projects, there is an additional dependency on System.Runtime.InteropServices.RuntimeInformation.

Enjoy!

Full Changelog: v1.0.0-rc.3...v1.0.0

v1.0.0-rc.3

17 May 23:10
Compare
Choose a tag to compare
v1.0.0-rc.3 Pre-release
Pre-release

This is one of the last pre-releases with improvements to the public API of the code. All code has been meticulously reviewed and documented. I now consider it ready for general use. I don't expect to make any further design changes, only bug fixes.

Highlights

I invested heavily in improving the performance for this release.

Bulk queries now have better throughput. Previously, the rate limiter would wait for a response to be fully processed before allowing the next request to begin. Now, the next request is allowed to begin immediately after receiving a response. This way, the time it takes to process a response is no longer a factor in rate limiting.

Heap allocations in JSON parsers have been further reduced by using static lambdas, to avoid allocating many System.Func<T> and "DisplayClass" closure objects.

Methods which take a collection of IDs, like GetAchievementsByIds, now accept IEnumerable<T> instead of IReadOnlyCollection<T>, making it possible to compose requests with LINQ, without the use of ToList().

WvW objectives polymorphy has been reworked, because there were inconsistencies and name conflicts between owned objectives and the reference data for those owned objectives.

The API exceptions have been simplified. All API failures now throw HttpRequestException instead of InvalidOperationException. A subtype BadResponseException was introduced for responses that don't contain a success status code and a valid JSON document.

The NuGet package size was reduced by about 20% by eliminating duplicate code.

New features

Characters:

  • Added the ability to retrieve multiple characters by name at once

Training:

  • Added the ability to retrieve specializations by page numbers and page size

Bug fixes

Guilds:

  • Fixed a crash when retrieving a guild without a valid access token
  • Properties of Guild which require a valid access token can now be null

Miscellaneous:

  • Improved ReadAsStreamAsync cancellation in older .NET versions
  • Fixed ValueOnly() extension method could throw AggregateException instead of the real exception
  • Fixed missing Extensible<T> enum support for MountName, ProfessionName and RaceName

Breaking changes

Story journal:

  • Removed unused MissingMemberHandling argument from method GetCompletedStorySteps

WvW objectives:

  • Removed property Objective.Kind and instead introduced subtypes like Camp, Tower, Keep etc.

WvW matches:

  • Renamed record Objective to OwnedObjective to fix name conflicts
  • Did the same for all subtypes like OwnedCamp, OwnedTower, OwnedKeep etc.

Miscellaneous:

  • Changed ByIds methods to operate on IEnumerable<T> instead of IReadOnlyCollection<T>
  • Changed QueryBuilder to be always mutable since the immutability was never really needed
  • Moved Link header types to a new WebLinks namespace
  • Changed Gw2Client error handling to throw HttpRequestException instead of types likes InvalidOperationException

Full Changelog: v1.0.0-rc.2...v1.0.0-rc.3

v1.0.0-rc.2

06 Apr 19:08
Compare
Choose a tag to compare
v1.0.0-rc.2 Pre-release
Pre-release

This is one of the last pre-releases with improvements to the public API of the code. All code has been meticulously reviewed and documented. I now consider it ready for general use. I don't expect to make any further design changes, only bug fixes.

Highlights

Skill polymorphy has been reworked because there were a lot of nullable properties on the base type that should have been required properties of a subtype instead. Now, the Skill base type only contains the properties which are truly shared for all abilities. A new ActionSkill subtype was introduced for skills which must be activated. Another subtype SlotSkill was introduced as the base type for healing, utility and elite skills.

New features

Dye colors:

  • Added method DyeColor.GetChatLink

Bug fixes

Exploration:

  • Fixed incorrect waypoint chat links generation for god shrines (Orr maps)

Breaking changes

Items:

  • Moved properties Item.Races, Item.Professions and Item.BodyTypes to a new property Restrictions of type ItemRestriction
  • Changed the type of these properties to Extensible<TEnum> and added a property Other to support future restrictions without throwing

Equipment skins:

  • Changed the type of EquipmentSkin.Races to Extensible<TEnum>

Skills:

  • Changed Skill.IconHref to not-null (but possibly empty)
  • Introduced base type ActionSkill for skills that require activation
  • Introduced base type SlotSkill for heal, utility and elite skills
  • Changed ActionSkill properties to not-null as they were previously nullable only to support passive skills:
    • Slot
    • WeaponType
    • Professions
  • Changed the Professions property from an empty list to a list of all professions when there are no profession restrictions, for example for open-world bundle skills.

Super Adventure Box:

  • Renamed SuperAdventureBoxMode.{Infantile->Exploration}

Full Changelog: v1.0.0-rc.1...v1.0.0-rc.2

v1.0.0-rc.1

30 Mar 11:38
Compare
Choose a tag to compare
v1.0.0-rc.1 Pre-release
Pre-release

This is one of the last pre-releases with improvements to the public API of the code. All code has been meticulously reviewed and documented. I now consider it ready for general use. I don't expect to make any further design changes, only bug fixes.

Highlights

Enums have been reworked to be extensible with Extensible<TEnum>. This is a type that behaves much like the underlying enum, but it can be assigned from strings and compared to strings.

This change was needed because new enum values are added to the API every now and then, and the code had to be updated to work with the new enum values each time this happened. Now, the code will just accept the unknown enum value. In your application code, you can then do a string comparison if the enum member is not already defined.

The string comparisons are ordinal/ignore case.

Note that while System.Enum implements IComparable, I decided not to implement it for Extensible<TEnum>, as it's not clear how unknown enum values should be compared to known enum values (or with each other). In my view, there is no right answer, just don't try to do that.

// Extensible<TEnum> can be assigned from a defined enum member
Extensible<Rarity> legendary = Rarity.Legendary;

// Extensible<TEnum> can also be assigned from any string
Extensible<Rarity> mythical = "Mythical"; 

// Same for comparisons, both defined enum members and strings are supported
Console.WriteLine(legendary == Rarity.Legendary); // true
Console.WriteLine(legendary == "Mythical");       // false
Console.WriteLine(mythical == Rarity.Legendary);  // false
Console.WriteLine(mythical == "Mythical");        // true

Types in the Pvp namespace have been reworked, to make them easier to use. Some types and properties were renamed to align with the names used in the game or on the official wiki.

New features

PvP:

  • Added property CurrentStanding.EffectiveRating

Miscellaneous:

  • Added extensible enums (see highlights above)

Bug fixes

PvP:

  • Fixed a wrong JSON mapping for property LeaderboardScoring.Name

Breaking changes

Masteries:

  • Renamed method Get{Masteries->MasteryTracks}ByIds

PvP:

  • Renamed argument heroId->mistChampionId
  • Renamed property MistChampion.{Overlay->OverlayImageHef}
  • Renamed property MistChampion.{Underlay->UnderlayImageHef}
  • Changed property Season.Divisions to IReadOnlyList<Division>
  • Changed property Division.Tiers to IReadOnlyList<DivisionTier>
  • Changed property Leaderboard.Scorings to IReadOnlyList<LeaderboardScoring>
  • Changed property LeaderboardEntry.Scores to IReadOnlyList<Score>
  • Changed property LeaderboardSettings.Tiers to IReadOnlyList<LeaderboardTier>
  • Changed property SeasonRank.Tiers to IReadOnlyList<RankTier>
  • Renamed type SeasonRank->SkillBadge
  • Renamed type RankTier->SkillBadgeTier
  • Renamed method Get{Leaderboards->LeaderboardIds}
  • Renamed property BestStanding.{Points->Pips}
  • Renamed property BestStanding.Total{Points->Pips}
  • Renamed property CurrentStanding.{Points->Pips}
  • Renamed property CurrentStanding.Total{Points->Pips}

Full Changelog: v1.0.0-preview.15...v1.0.0-rc.1

v1.0.0-preview.15

25 Mar 14:22
Compare
Choose a tag to compare
v1.0.0-preview.15 Pre-release
Pre-release

This is just a small hotfix to the PACKAGE readme, which contained an error in preview 14. Unfortunately it could not be changed without creating a new release. There are no other changes.

Full Changelog: v1.0.0-preview.14...v1.0.0-preview.15

v1.0.0-preview.14

25 Mar 14:06
Compare
Choose a tag to compare
v1.0.0-preview.14 Pre-release
Pre-release

This is one of the last pre-releases with improvements to the public API of the code. The only area of the code left to document and potentially improve is the PvP namespace. I expect to publish the first release candidate not long after that. It was also announced that changes to the WvW API are coming, which I expect will have some impact for everyone using those parts.

Highlights

The Wizard's Vault can now be accessed using Gw2Client.WizardsVault.

Performance has been improved: the number of String allocations in JSON parsers has been drastically reduced, thanks to internal use of Span<char> without instantiating the String.

Types in the Items namespace have been largely reworked, to make them much easier to use. Some types and properties were renamed to align with the names used in the game or on the official wiki.

More helper methods to create chat links were added.

New features

  • Added extension method AsDictionary, which helps you turn a HashSet result into a Dictionary result more easily
  • Added extension method ValueOnly, which lets you discard the MessageContext from a result more easily
  • Added the ability to retrieve the Wizard's Vault season, objectives, progress, rewards and purchased rewards
  • Added the ability to fetch home gathering nodes by ID or by page
  • Added the ability to create chat links for WvW objectives (camps, towers etc.)
  • Added method Objective.GetChatLink
  • Added method EquipmentItem.GetChatLink
  • Added method JadeBotSkin.GetChatLink
  • Added method RecipeSheet.GetRecipeChatLink
  • Added method RecipeSheet.GetExtraRecipeChatLinks
  • Added method Transmutation.GetSkinChatLinks
  • Added method EquipmentSkin.GetChatLink
  • Added property SalvageTool.Unbreakable (bool)
  • Greatly reduced the number of String allocations in JSON parsers

Bug fixes

Achievements:

  • Fixed a potential JSON exception for unknown/future achievement types

Items:

  • Added a workaround for PvP runes and sigils not being classified as such in the API

WvW:

  • Fixed property Objective.Coordinates to be set to null instead of (0, 0, 0)
  • Fixed property MatchStats.Maps to be a collection of MapSummary instead of object

Miscellaneous:

  • Improved handling of malformed JSON
  • Changed property BaseAddress.Default from static readonly string to const string
  • Removed invalid FlagsAttribute from the MapType enum used by the Mumble integration
  • Added forgotten MissingMemberBehavior parameters to BuildsClient, MasteriesClient, DungeonsClient, MapChestsClient, RaidsClient and GameTick

Breaking changes

Dyes:

  • Renamed type Dye->DyeColor

Items:

  • Split property EquipmentItem.UpgradeItemIds into SuffixItemId and SecondarySuffixItemId
  • Split property Item.Restrictions into Races, Professions and BodyTypes
  • Changed property Item.Races to be a list of all races when no restrictions apply
  • Changed property Item.Professions to be a list of all professions when no restrictions apply
  • Changed property Item.BodyTypes to be a list of all body types when no restrictions apply
  • Renamed method Get{ItemStats->AttributeCombinations}Index
  • Renamed property Armor.Default{Skin->SkinId}
  • Renamed property Backpack.Default{Skin->SkinId}
  • Renamed property Weapon.Default{Skin->SkinId}
  • Changed property Armor.InfusionSlots to IReadOnlyList<InfusionSlot>
  • Changed property Backpack.InfusionSlots to IReadOnlyList<InfusionSlot>
  • Changed property Trinket.InfusionSlots to IReadOnlyList<InfusionSlot>
  • Changed property Weapon.InfusionSlots to IReadOnlyList<InfusionSlot>
  • Changed property Armor.StatChoices to IReadOnlyList<int> and changed it to not-nullable
  • Changed property Backpack.StatChoices to IReadOnlyList<int> and changed it to not-nullable
  • Changed property Trinket.StatChoices to IReadOnlyList<int> and changed it to not-nullable
  • Changed property Weapon.StatChoices to IReadOnlyList<int> and changed it to not-nullable
  • Changed property Rune.Bonuses to IReadOnlyList<string>
  • Renamed property InfixUpgrade.{ItemstatsId->AttributeCombinationId}
  • Changed property InfixUpgrade.Attributes to a dictionary, copying the design of EquipmentItem.Attributes
  • Flattened property of type InfixUpgrade: Armor.Prefix, Backpack.Prefix, Trinket.Prefix, Weapon.Prefix and UpgradeComponent.Suffix
  • Deleted the InfixUpgrade type
  • Removed type DefaultContainer and replaced usages with the base type Container
  • Removed type DefaultGizmo and replaced usages with the base type Gizmo
  • Removed type DefaultUpgradeComponent and replaced usages with the base type UpgradeComponent
  • Removed type Tool and replaced usages with the derived type SalvageTool (the only derived type)
  • Renamed type ItemUpgrade->InfusionSlotUpgradePath
  • Moved property Trinket.UpgradesFrom to type Ring since only rings can be upgraded
  • Moved property Trinket.UpgradesInto to type Ring since only rings can be upgraded
  • Changed property Backpack.UpgradesFrom to new type InfusionSlotUpgradeSource with the same properties as before
  • Changed property Backpack.UpgradesFrom to not-nullable
  • Changed property Backpack.UpgradesInto to not-nullable
  • Changed property Ring.UpgradesFrom to new type InfusionSlotUpgradeSource with the same properties as before
  • Changed property Ring.UpgradesFrom to not-nullable
  • Changed property Ring.UpgradesInto to not-nullable
  • Changed property CraftingMaterial.UpgradesInto to not-nullable
  • Renamed property Transmutation.{Skins->SkinIds}
  • Renamed type ImmediateConsumable->Service
  • Grouped consumable effect properties into a new Effect type
    • Name
    • Description
    • Duration
    • ApplyCount
    • IconHref
  • Added properties of type Effect to Food, Utility, Service and GenericConsumable and deleted the old properties
  • Renamed type Mount{RandomUnlocker->License}
  • Renamed type {Ms->MountSkin}Unlocker
  • Renamed type Upgrade{Remover->Extractor}
  • Renamed type BagSlot{Unlocker->Expansion}
  • Renamed type BankTab{Unlocker->Expansion}
  • Renamed type Build{LibrarySlotUnlocker->StorageExpansion}
  • Renamed type Build{LoadoutTabUnlocker->TemplateExpansion}
  • Renamed type GearLoadoutTabUnlocker->EquipmentTemplateExpansion
  • Renamed type CollectibleCapacityUnlocker->StorageExpander
  • Renamed type {Champion->MistChampion}Unlocker
  • Renamed type CraftingRecipeUnlocker->RecipeSheet
  • Changed property RecipeSheet.ExtraRecipeIds to not-nullable
  • Renamed type DyeUnlocker->Dye
  • Renamed type Shared{SlotUnlocker->InventorySlot}
  • Renamed type OpenUiContainer->BlackLionChest
  • Renamed type ContainerKey->BlackLionChestKey
  • Renamed type ForagingTool->HarvestingSickle
  • Renamed Logging{Tool->Axe}
  • Renamed MiningTool->Pick
  • Replaced type Key with Trophy (weird type, had nothing to do with keys, the items are trophies)
  • Removed property Gizmo.VendorIds (weird and inconsistent data, vendors API is unavailable anyway)

Mount skins:

  • Renamed Mount.Default{Skin->SkinId}

Equipment skins:

  • Renamed type Skin->EquipmentSkin
  • Renamed property EquipmentSkin.{Restrictions->Races}
  • Changed property EquipmentSkin.Races to be a list of all races when no restrictions apply

Ranger pets:

  • Changed property Pet.Skills to IReadOnlyList<PetSkill>

WvW:

  • Changed property Ability.Ranks to IReadOnlyList<AbilityRank>
  • Changed property ObjectiveUpgrade.Tiers to IReadOnlyList<UpgradeTier>
  • Changed property UpgradeTier.Upgrades to IReadOnlyList<Upgrade>
  • Renamed property Objective.Marker{Href->IconHref}

Quaggans:

  • Renamed property Quaggan.{Picture->Image}Href

Miscellaneous:

  • Moved enum WeightClass to namespace Hero
  • Moved enum RaceName to namespace Hero
  • Moved enum Gender to namespace Hero
  • Renamed enum Gender->BodyType
  • Flattened property MessageContext.ResultContext and deleted the ResultContext type
  • Flattened property MessageContext.PageContext and deleted the PageContext type
  • Added class BulkProgress to replace ResultContext in bulk queries with IProgess<>
  • Removed unused map types from the MapType enum used by the Mumble integration

Full Changelog: v1.0.0-preview.13...v1.0.0-preview.14

v1.0.0-preview.13

18 Feb 04:15
Compare
Choose a tag to compare
v1.0.0-preview.13 Pre-release
Pre-release

This is another intermediate preview release to improve the public API of the code, this time focusing on Hero (masteries, emotes, etc.)

Masteries and (background) stories were improved to use terminology found in the game and in the GW2 wiki. Previously, names were used which could mean something else in the game or wiki, which might cause confusion.

Good news for Revenants as I fixed a few of the broken legends. Vindicator is still not working correctly, but must be fixed in the API first.

The API was previously missing mastery region names for EoD and SotO, but a recent API update rectified it. This release adds the associated region names Jade and Sky. I also changed MasteryPointsTotal.Region from string to the MasteryRegionName enum. This is how the API was originally designed, but the data was silently changed from region names to expansion names. Possibly it was not an intended change as it was not documented in the API release notes. Mastery insight points in the Maps API still refer to the region name only, not the expansion name. This release contains compensating code to convert expansion names back to region names.

This release also introduces chat links creation. You can now create chat links from objects using a simple API:

var link = new ItemLink
{
    ItemId = 23040
};
string chatLink = link.ToString();

You can also parse existing links, to inspect them or even update them:

var link = ItemLink.Parse("[&AgEAWgAA]");
var count = link.Count;
var newLink = link with { Count = count + 1 };
string chatLink = newLink.ToString();

I also enabled AOT compilation as of this release.

New features

  • Chat links
  • Added missing mastery region names (Jade and Sky)
  • Added Build.SelectedSpecializationIds() method
  • Added Build.SelectedTraitIds() method
  • Added Build.SelectedSkillIds() method
  • Added SkillBar.SelectedSkillIds() method
  • Added ability to retrieve unlocked glider skins
  • Enabled ahead-of-time compilation (reduces startup time)

Bug fixes

  • Fixed Build.Legends garbage legend IDs

Breaking changes

Builds:

  • Renamed WeaponType.Speargun to HarpoonGun
  • Split SkillBar.UtilitySkillIds into 3 props
  • Split Build.Specializations into 3 props
  • Split SelectedSpecialization.TraitIds into 3 props
  • Grouped Build.Legends and Build.AquatingLegends into SelectedLegends
  • Reworked Build.PetSkills to Pets, it had nothing to do with skills

Dyes:

  • Renamed GetUnlockedDyesIndex to GetUnlockedColors
  • Renamed Dye.Item to ItemId
  • Renamed DyeSlot.ColorId to DyeId
  • Split Categories into Hue, Material and ColorSet

Emotes:

  • Renamed Emote.UnlockItems to UnlockItemIds

Equipment:

  • Renamed EquipmentItem.DyeIds to DyeColorIds
  • Changed EquipmentItem.DyeColorIds to be an empty list instead of null
  • Changed EquipmentItem.UpgradeItemIds to be an empty list instead of null
  • Changed EquipmentItem.InfusionItemIds to be an empty list instead of null
  • Changed EquipmentItem.TemplateNumbers to be an empty list instead of null
  • Renamed CombatAttribute to AttributeName
  • Renamed old attribute names like CritDamage to modern names like Ferocity
  • Replaced UpgradeAttributeName with AttributeName
  • Renamed SelectedStat to SelectedAttributeCombination
  • Changed SelectedAttributeCombination.Attributes to a Dictionary<AttributeName, int>

Exploration:

  • Renamed MapSummariesByIds to GetMapSummariesByIds

Finishers:

  • Renamed Finisher.UnlockItems to UnlockItemIds
  • Renamed Finisher.UnlockDetails to LockedText

Gliders:

  • Renamed Glider to GliderSkin
  • Renamed GliderSkin.UnlockItems to UnlockItemIds
  • Renamed GliderSkin.DefaultDyes to DefaultDyeColorIds and changed to IReadOnlyList

Home:

  • Renamed GetOwnedCatsIndex to GetUnlockedCats
  • Renamed GetUnlockedNodesIndex to GetUnlockedNodes

Items:

  • Renamed ItemStats to AttributeCombination

Jade bots:

  • Renamed JadeBot to JadeBotSkin

Mail carriers:

  • Renamed MailCarrier.UnlockItems to UnlockItemIds
  • Renamed GetOwnedMailCarriers to GetUnlockedMailCarriers

Masteries:

  • Changed the type of MasteryPointsTotal.Region from string to the MasteryRegionName enum
  • Renamed Mastery to MasteryTrack
  • Renamed MasteryLevel to Mastery
  • Renamed Levels to Masteries and converted to IReadOnlyList
  • Renamed Background to BackgroundHref

Miniatures:

  • Renamed Minipet to Miniature
  • Renamed Miniature.Unlock to LockedText

Mounts:

  • Renamed GetOwnedMounts to GetUnlockedMounts
  • Renamed GetOwnedMountSkins to GetUnlockedMountSkins
  • Renamed Mount.Skin to SkinIds
  • Renamed MountName.Turtle to SiegeTurtle
  • Changed MountSkin.DyeSlots to IReadOnlyList

Novelties:

  • Renamed GetUnlockedNoveltiesIndex to GetUnlockedNovelties
  • Renamed Novelty.UnlockItems to UnlockItemIds

Races:

  • Renamed Race.Skills to SkillIds and converted to IReadOnlyList

Background stories:

  • Reorganized namespaces
  • Renamed CharacterBackstory.Backstory to AnswerIds
  • Renamed Backstory to BackgroundStory everywhere else
  • Renamed Question to QuestionId
  • Renamed Answers to AnswerIds and converted to IReadOnlyList
  • Changed Races and Professions collections in background story Q&A to not-null collections
    • Previously they contained a list of restrictions, or were null if no restrictions applied
    • Now the collections contain all races and professions instead of being null

Inventories:

  • Changed ItemSlot.UpgradeItemIds to SuffixItemId and SecondarySuffixItemId
  • Renamed ItemSlot.DyeIds to DyeColorIds
  • Changed ItemSlot.DyeColorIds to be an empty list instead of null
  • Changed ItemSlot.InfusionItemIds to be an empty list instead of null

Outfits:

  • Renamed GetUnlockedOutfitsIndex to GetUnlockedOutfits
  • Renamed Outfit.UnlockItems to UnlockItemIds

Pvp:

  • Renamed GetUnlockedHeroesIndex to GetUnlockedMistChampions
  • Renamed MistChampionSkin.UnlockItems to UnlockItemIds

Skiffs:

  • Renamed Skiff to SkiffSkin

Story lines:

  • Renamed Season to Storyline
  • Renamed Quest to StoryStep
  • Renamed Story to StoryId
  • Renamed Goal to Objective
  • Renamed GetCharacterQuests to GetCompletedStorySteps
  • Changed Story.Chapters to IReadOnlyList
  • Changed StoryStep.Objectives to IReadOnlyList
  • Changed Story.Races to not-null collection
    • Previously it contained a list of restrictions, or was null if no restrictions applied
    • Now the collection contains all races instead of being null

Titles:

  • Renamed GetUnlockedTitlesIndex to GetUnlockedTitles

Training:

  • Reorganized namespaces
  • Renamed SkillReference to SkillSummary
  • Renamed Specializations to SpecializationIds and converted to IReadOnlyList
  • Changed Weapons dictionary key from string to WeaponType enum
  • Changed Skills to IReadOnlyList
  • Changed Training to IReadOnlyList
  • Added an exception when duplicate skill palettes are encountered instead of arbitrarily choosing the last one

Wardrobe:

  • Renamed GetUnlockedSkinsIndex to GetUnlockedSkins
  • Changed DyeSlotInfo properties to IReadOnlyList
  • Changed Skin.Restrictions list type to RaceName

Full Changelog: v1.0.0-preview.12...v1.0.0-preview.13

v1.0.0-preview.12

11 Dec 05:53
Compare
Choose a tag to compare
v1.0.0-preview.12 Pre-release
Pre-release

Another intermediate preview release to improve the public API of the code, this time focusing on Crafting. I also cleaned up the root namespace and improved support for flag enums.

Previously almost all enums were in the root namespace, ignoring more logical choices. For example ItemRestriction is now moved to the Items namespace.

Collections of flag enums were replaced with record types consisting of boolean properties for each flag.

Breaking changes

General:

  • Moved enums from the root namespace into specific namespaces
  • Converted collections of flag enums to record types
  • Removed unused code
    • AccessCondition enum
    • Day enum

Crafting:

  • Reorganized Crafting namespace into Disciplines, Recipes and Daily

Hero:

  • Renamed AttributeAdjustmentTarget to CombatAttribute

Items:

  • Renamed JadeBotUpgrade to JadeTechModule

Tokens:

  • Renamed namespace Authentication to Authorization since it contains code to deal with permissions

HTTP plumbing:

  • Moved LinkHeader to namespace GuildWars2.Http.Headers
  • Renamed LinkHeaderValue to LinkValue and moved to namespace GuildWars2.Http.Headers

New features

General:

  • Exceptions thrown during JSON conversions now include the raw JSON text in Exception.Data["Value"] to aid debugging

Full Changelog: v1.0.0-preview.11...v1.0.0-preview.12

v1.0.0-preview.11

05 Dec 16:37
Compare
Choose a tag to compare
v1.0.0-preview.11 Pre-release
Pre-release

Another intermediate preview release to improve the public API of the code, this time focusing on Authentication, Commerce, Exploration, Guilds and Worlds.

This is also the first release that is built with .NET 8.0.100 and C# 12, previously .NET 8.0 RC2 and C# 11.

Breaking changes

General:

  • Changed IReadOnlyCollection to IReadOnlyList in places where order matters
  • Renamed Icon to IconHref
  • Renamed ChunkQuery to BulkRequest

Commerce:

  • Renamed GemsForGold to GemsToGold
  • Renamed GoldForGems to GoldToGems
  • Renamed Order.Price to UnitPrice
  • Renamed Transaction.Price to UnitPrice

Exploration:

  • Renamed MasteryPoint to MasteryInsight
  • Renamed UnlockerPointOfInterest to RequiresUnlockPointOfInterest
  • Renamed GetMapSummariesIndex to GetMapsIndex

Guilds:

  • Split EmblemPart into EmblemForeground and EmblemBackground
  • Renamed GuildBackgroundEmblem to GuildEmblemBackground
  • Renamed GuildForegroundEmblem to GuildEmblemForeground
  • Changed GuildEmblemFlags from a list of enums to a class with boolean properties
  • Changed GuildUpgradeCost to an inheritable type, with derived types for each cost kind
    • GuildUpgradeCoinsCost
    • GuildUpgradeCollectibleCost
    • GuildUpgradeCurrencyCost
    • GuildUpgradeItemCost
  • Renamed GuildStash to GuildBank
  • Removed GuildPermission enum, strings are now used instead

Skills:

  • Changed AttributeAdjustment.Target to nullable as some newer skills that appeared in the beta don't use this property

New features

Skills:

  • Added AttributeAdjustment.HitCount for skills that modify an attribute for a number of hits

Worlds:

  • Added World.TransferFee, the gem fee for transferring to the world
  • Added World.Region, indicating EU or NA
  • Added World.Language, indicating the language associated with the world

Full Changelog: v1.0.0-preview.10...v1.0.0-preview.11

v1.0.0-preview.10

12 Nov 19:15
Compare
Choose a tag to compare
v1.0.0-preview.10 Pre-release
Pre-release

Another intermediate preview release to improve the logical grouping of APIs.

My goal for this release is to make things easy to find in the SDK based on your knowledge of the game. I.e. if you know where to find it in the game, you should be able to find it in the SDK. (The API endpoints are not organized that way, so this is an opiniated choice.)

Specifically, most APIs pertaining to the player have been moved into a new Hero namespace. The namespace layout should be familiar to players of the game, it's modeled after the Hero panel in the game.

A diagram of the new situation can be found on the wiki Features page.

I don't expect to do any more large scale changes after this. I'm reasonably happy with the current design. I only expect more localized breaking changes as I'm reviewing and documenting all the code and making improvements along the way. I'd rather do these changes now than after the v1.0.0 stable release.

Breaking changes

  • Reorganized namespaces (and Gw2Client members) to match game concepts
  • Renamed Query classes to Client as it sounds more familiar

New features

  • Added Jade bot skins
  • Added Skiffs skins

Bug fixes

  • Fixed overlapping members in the ItemRestriction enum
  • Fixed heal skills containing an undefined Attunement value for non-Elementalist heal skills

Full Changelog: v1.0.0-preview.9...v1.0.0-preview.10