From e4c5515643bd8ea55206bb5b50f2f1157e3c26f8 Mon Sep 17 00:00:00 2001 From: Damon Pollard Date: Thu, 12 May 2016 18:00:55 +0800 Subject: [PATCH 1/2] Updated models after API update. --- .../JSON/Metadata/Common/requisition-pack.schema.json | 2 +- .../JSON/Metadata/game-base-variants.schema.json | 2 +- Source/HaloSharp/Model/Enumeration.cs | 7 ++++--- Source/HaloSharp/Model/Metadata/GameBaseVariant.cs | 2 +- Source/HaloSharp/Model/Stats/Common/BaseStat.cs | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Source/HaloSharp.Test/JSON/Metadata/Common/requisition-pack.schema.json b/Source/HaloSharp.Test/JSON/Metadata/Common/requisition-pack.schema.json index 4504904..e51ac53 100644 --- a/Source/HaloSharp.Test/JSON/Metadata/Common/requisition-pack.schema.json +++ b/Source/HaloSharp.Test/JSON/Metadata/Common/requisition-pack.schema.json @@ -46,7 +46,7 @@ "type": "integer" }, "flair": { - "type": "null" + "type": [ "string", "null" ] }, "stackedRequisitionPacks": { "type": "array", diff --git a/Source/HaloSharp.Test/JSON/Metadata/game-base-variants.schema.json b/Source/HaloSharp.Test/JSON/Metadata/game-base-variants.schema.json index c0c239d..971f0c1 100644 --- a/Source/HaloSharp.Test/JSON/Metadata/game-base-variants.schema.json +++ b/Source/HaloSharp.Test/JSON/Metadata/game-base-variants.schema.json @@ -14,7 +14,7 @@ "type": [ "null", "string" ] }, "supportedGameModes": { - "type": "array", + "type": ["null", "array"], "additionalItems": false, "items": { "type": "string" diff --git a/Source/HaloSharp/Model/Enumeration.cs b/Source/HaloSharp/Model/Enumeration.cs index da1381d..c1174ae 100644 --- a/Source/HaloSharp/Model/Enumeration.cs +++ b/Source/HaloSharp/Model/Enumeration.cs @@ -113,7 +113,8 @@ public enum MedalType Warzone, WeaponProficiency, Goal, - Ball + Ball, + Infection } public enum OwnerType @@ -137,11 +138,11 @@ public enum RequisitionPackType None, New, Hot, - LeavingSoon, + [EnumMember(Value = "Leaving Soon")] LeavingSoon, [EnumMember(Value = "Maximum Value")] MaximumValue, [EnumMember(Value = "Limited Time")] Limitedtime, Featured, - BestSeller, + [EnumMember(Value = "Best Seller")] BestSeller, Popular } diff --git a/Source/HaloSharp/Model/Metadata/GameBaseVariant.cs b/Source/HaloSharp/Model/Metadata/GameBaseVariant.cs index dcce567..30b065c 100644 --- a/Source/HaloSharp/Model/Metadata/GameBaseVariant.cs +++ b/Source/HaloSharp/Model/Metadata/GameBaseVariant.cs @@ -76,7 +76,7 @@ public bool Equals(GameBaseVariant other) && Id.Equals(other.Id) && string.Equals(InternalName, other.InternalName) && string.Equals(Name, other.Name) - && SupportedGameModes.OrderBy(sgm => sgm).SequenceEqual(other.SupportedGameModes.OrderBy(sgm => sgm)); + && ((SupportedGameModes == null && other.SupportedGameModes == null) || (SupportedGameModes != null && other.SupportedGameModes != null && SupportedGameModes.OrderBy(ka => ka).SequenceEqual(other.SupportedGameModes.OrderBy(ka => ka)))); } public override bool Equals(object obj) diff --git a/Source/HaloSharp/Model/Stats/Common/BaseStat.cs b/Source/HaloSharp/Model/Stats/Common/BaseStat.cs index 91c198a..8174b4e 100644 --- a/Source/HaloSharp/Model/Stats/Common/BaseStat.cs +++ b/Source/HaloSharp/Model/Stats/Common/BaseStat.cs @@ -440,7 +440,7 @@ public class WeaponId : IEquatable /// Any attachments the weapon had. /// [JsonProperty(PropertyName = "Attachments")] - public List Attachments { get; set; } + public List Attachments { get; set; } /// /// The ID of the weapon. Weapons are available via the Metadata API. From a8bf30cc797fb9205a20c9fa5a95416b3a80c3ca Mon Sep 17 00:00:00 2001 From: Damon Pollard Date: Thu, 12 May 2016 18:03:28 +0800 Subject: [PATCH 2/2] NuGet package v1.5.1.0 --- README.md | 4 ++++ Source/HaloSharp.Test/Properties/AssemblyInfo.cs | 4 ++-- Source/HaloSharp/Properties/AssemblyInfo.cs | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a6f9e0b..97e19aa 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,10 @@ A Nuget package is available at [www.nuget.org/packages/HaloSharp](https://www.n ### Changelog ### +###### v.1.5.1.0 (2016-05-12) + +1. Added new Medal Enum (Infection Hype!). + ###### v.1.5.0.0 (2016-04-21) 1. Stats Endpoints. diff --git a/Source/HaloSharp.Test/Properties/AssemblyInfo.cs b/Source/HaloSharp.Test/Properties/AssemblyInfo.cs index ea65652..b9cfd85 100644 --- a/Source/HaloSharp.Test/Properties/AssemblyInfo.cs +++ b/Source/HaloSharp.Test/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.5.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("1.5.1.0")] +[assembly: AssemblyFileVersion("1.5.1.0")] \ No newline at end of file diff --git a/Source/HaloSharp/Properties/AssemblyInfo.cs b/Source/HaloSharp/Properties/AssemblyInfo.cs index 0d66d92..e1b067c 100644 --- a/Source/HaloSharp/Properties/AssemblyInfo.cs +++ b/Source/HaloSharp/Properties/AssemblyInfo.cs @@ -32,8 +32,8 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.5.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] +[assembly: AssemblyVersion("1.5.1.0")] +[assembly: AssemblyFileVersion("1.5.1.0")] //HaloSharp.Test [assembly: InternalsVisibleTo("HaloSharp.Test")] \ No newline at end of file