Skip to content

v0.12.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 22 Dec 22:56
· 115 commits to master since this release
v0.12.0
f3977fa

After 2 years of development, this version marks a milestone for Gw2Sharp.

It is now feature complete, with thanks to @werdes for setting up WvW support that I have postponed for quite a while.

What does this mean for the future for Gw2Sharp?
Well, there is at least one additional thing I still want to finish, and that's updating the System.Text.Json dependency to version 5.
Once I've finished that, Gw2Sharp 1.0.0 is around the corner, and it's pretty much done until ArenaNet adds additional endpoints or makes additional changes to the API.

Besides feature completing Gw2Sharp, this version also includes a major update regarding caching support as mentioned in 0.11.1.
This is a breaking change, but it will make caching more reliable (#71).
All interfaces and built-in caching classes have been overhauled.
In short, the focus was to only support strings and raw byte arrays, instead of generic types that have to be converted back and forth between C# objects and JSON strings.

Ironically, while the classes themselves have had their generic types removed, the cache objects are actually more generic since they support the raw responses instead of being bound to C# types.

Heads up: If you've been using the ArchiveCacheMethod, keep in mind that 0.12.0 uses a new file structure and will fully clear the archive if it detects that the archive isn't in the structure it expects it to be.
If you decide to revert to an older Gw2Sharp version, you may experience exceptions if you don't delete the archive manually before using it.
Please do not report those issues as they will not be worked on.

If you haven't implemented your own caching method(s), you should have no issues updating.

Caching

  • Breaking: Gw2Sharp.WebApi.Caching.CacheItem<T> has been removed
  • Breaking: Gw2Sharp.WebApi.Caching.CacheItem no longer implements IEquatable<CacheItem> since it's no longer used internally
  • Breaking: Since the generic version of Gw2Sharp.WebApi.Caching.CacheItem has been removed, the actual data can now be retrieved with the properties RawItem or StringItem, depending if it's a raw byte array or a string (accessing the wrong property will throw an InvalidOperationException)
  • Gw2Sharp.WebApi.Caching.CacheItem has additional properties Status, Type and StatusCode
  • The enums Gw2Sharp.WebApi.Caching.CacheItemStatus and Gw2Sharp.WebApi.Caching.CacheItemType have been added to support the previous mentioned properties
  • Breaking: In Gw2Sharp.WebApi.Caching.ICacheMethod (and their derivatives BaseCacheMethod, ArchiveCacheMethod, MemoryCacheMethod and NullCacheMethod), the methods TryGetAsync, SetAsync, SetManyAsync, GetOrUpdateAsync and GetOrUpdateManyAsync have been changed to non-generic versions of themselves and CacheItem
  • Breaking: In Gw2Sharp.WebApi.Caching.ICacheMethod (and their derivatives BaseCacheMethod, ArchiveCacheMethod, MemoryCacheMethod and NullCacheMethod), the methods SetAsync, GetOrUpdateAsync and GetOrUpdateManyAsync have had their signature changed to strip out redundant parameters that are now included in CacheItem
  • Breaking: The internal ZIP file structure used in Gw2Sharp.WebApi.Caching.ArchiveCacheMethod has been changed to support the caching changes, bumping it from no versioning to version 1

HTTP

  • Breaking: The constant CACHE_STATE_HEADER in Gw2Sharp.WebApi.Http.HttpResponseInfo has been removed in favor of having a dedicated cache state property on various classes, instead of injecting it through a custom Gw2Sharp header
  • Breaking: Gw2Sharp.WebApi.Http.IHttpResponseStream and Gw2Sharp.WebApi.Http.IWebApiResponse have the additional property CacheState
  • Breaking: The constructors of Gw2Sharp.WebApi.Http.HttpResponseInfo, Gw2Sharp.WebApi.Http.HttpResponseStream, Gw2Sharp.WebApi.Http.WebApiResponse and Gw2Sharp.WebApi.V2.ApiV2HttpResponseInfo have been modified to accept the CacheState parameter

Endpoints

  • Add /v2/wvw/abilities (#80 by @werdes)
  • Add /v2/wvw/matches (#80 by @werdes)
  • Add /v2/wvw/matches/overview (#80)
  • Add /v2/wvw/matches/scores (#80)
  • Add /v2/wvw/matches/stats (#80)
  • Add /v2/wvw/objectives (#80 by @werdes)
  • Add /v2/wvw/ranks (#80 by @werdes)
  • Add /v2/wvw/upgrades (#80 by @werdes)
  • Add AttributeAdjustment property to various item related models (Gw2Sharp.WebApi.V2.Models.ItemArmorDetails, Gw2Sharp.WebApi.V2.Models.ItemBackDetails, Gw2Sharp.WebApi.V2.Models.ItemTrinketDetails, Gw2Sharp.WebApi.V2.Models.ItemUpgradeComponentDetails, Gw2Sharp.WebApi.V2.Models.ItemWeaponDetails) (#70, #84)