Skip to content

Commit

Permalink
update for API v2.15.0 - Season of the Haunted
Browse files Browse the repository at this point in the history
  • Loading branch information
Cytraen committed May 30, 2022
1 parent a56f36e commit adae8fc
Show file tree
Hide file tree
Showing 20 changed files with 306 additions and 15 deletions.
2 changes: 1 addition & 1 deletion BungieSharper.Benchmark/BungieSharper.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<IsPackable>false</IsPackable>

<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<VersionPrefix>0.9.0</VersionPrefix>
<VersionPrefix>0.9.1</VersionPrefix>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<IsPackable>false</IsPackable>

<TargetFramework>net6.0</TargetFramework>
<VersionPrefix>0.9.0</VersionPrefix>
<VersionPrefix>0.9.1</VersionPrefix>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<IsPackable>true</IsPackable>

<TargetFramework>net6.0</TargetFramework>
<VersionPrefix>0.9.0</VersionPrefix>
<VersionPrefix>0.9.1</VersionPrefix>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion BungieSharper.CodeGen/BungieSharper.CodeGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<IsPackable>false</IsPackable>

<TargetFramework>net6.0</TargetFramework>
<VersionPrefix>0.9.0</VersionPrefix>
<VersionPrefix>0.9.1</VersionPrefix>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion BungieSharper.Entities/BungieSharper.Entities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<EnablePackageValidation>true</EnablePackageValidation>

<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<VersionPrefix>0.9.0</VersionPrefix>
<VersionPrefix>0.9.1</VersionPrefix>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ public class DestinyActivityModifierDefinition
[JsonPropertyName("displayProperties")]
public Destiny.Definitions.Common.DestinyDisplayPropertiesDefinition DisplayProperties { get; set; }

[JsonPropertyName("displayInNavMode")]
public bool DisplayInNavMode { get; set; }

[JsonPropertyName("displayInActivitySelection")]
public bool DisplayInActivitySelection { get; set; }

/// <summary>
/// The unique identifier for this entity. Guaranteed to be unique for the type of entity, but not globally.
/// When entities refer to each other in Destiny content, it is this hash that they are referring to.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public class DestinyRecordDefinition
[JsonPropertyName("forTitleGilding")]
public bool ForTitleGilding { get; set; }

/// <summary>A hint to show a large icon for a reward</summary>
[JsonPropertyName("shouldShowLargeIcons")]
public bool ShouldShowLargeIcons { get; set; }

[JsonPropertyName("titleInfo")]
public Destiny.Definitions.Records.DestinyRecordTitleBlock TitleInfo { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ public class DestinyTraitDefinition
[JsonPropertyName("traitCategoryHash")]
public uint TraitCategoryHash { get; set; }

/// <summary>An identifier for how this trait can be displayed. For example: a 'keyword' hint to show an explanation for certain related terms.</summary>
[JsonPropertyName("displayHint")]
public string DisplayHint { get; set; }

/// <summary>
/// The unique identifier for this entity. Guaranteed to be unique for the type of entity, but not globally.
/// When entities refer to each other in Destiny content, it is this hash that they are referring to.
Expand Down
77 changes: 76 additions & 1 deletion BungieSharper.Entities/Destiny/Entities.Destiny.Definitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2678,7 +2678,10 @@ public class DestinyObjectiveDefinition
[JsonPropertyName("isCountingDownward")]
public bool IsCountingDownward { get; set; }

/// <summary>The UI style applied to the objective. It's an enum, take a look at DestinyUnlockValueUIStyle for details of the possible styles. Use this info as you wish to customize your UI.</summary>
/// <summary>
/// The UI style applied to the objective. It's an enum, take a look at DestinyUnlockValueUIStyle for details of the possible styles. Use this info as you wish to customize your UI.
/// DEPRECATED: This is no longer populated by Destiny 2 game content. Please use inProgressValueStyle and completedValueStyle instead.
/// </summary>
[JsonPropertyName("valueStyle")]
public Destiny.DestinyUnlockValueUIStyle ValueStyle { get; set; }

Expand Down Expand Up @@ -3591,6 +3594,73 @@ public class DestinyFactionVendorDefinition
internal partial class DestinyFactionVendorDefinitionJsonContext : JsonSerializerContext { }
#endif

public class DestinySandboxPatternDefinition
{
[JsonPropertyName("patternHash")]
public uint PatternHash { get; set; }

[JsonPropertyName("patternGlobalTagIdHash")]
public uint PatternGlobalTagIdHash { get; set; }

[JsonPropertyName("weaponContentGroupHash")]
public uint WeaponContentGroupHash { get; set; }

[JsonPropertyName("weaponTranslationGroupHash")]
public uint WeaponTranslationGroupHash { get; set; }

[JsonPropertyName("weaponTypeHash")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public uint? WeaponTypeHash { get; set; }

[JsonPropertyName("weaponType")]
public Destiny.DestinyItemSubType WeaponType { get; set; }

[JsonPropertyName("filters")]
public IEnumerable<Destiny.Definitions.DestinyArrangementRegionFilterDefinition> Filters { get; set; }

/// <summary>
/// The unique identifier for this entity. Guaranteed to be unique for the type of entity, but not globally.
/// When entities refer to each other in Destiny content, it is this hash that they are referring to.
/// </summary>
[JsonPropertyName("hash")]
public uint Hash { get; set; }

/// <summary>The index of the entity as it was found in the investment tables.</summary>
[JsonPropertyName("index")]
public int Index { get; set; }

/// <summary>If this is true, then there is an entity with this identifier/type combination, but BNet is not yet allowed to show it. Sorry!</summary>
[JsonPropertyName("redacted")]
public bool Redacted { get; set; }
}

#if NET6_0_OR_GREATER
[JsonSerializable(typeof(DestinySandboxPatternDefinition))]
[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)]
internal partial class DestinySandboxPatternDefinitionJsonContext : JsonSerializerContext { }
#endif

public class DestinyArrangementRegionFilterDefinition
{
[JsonPropertyName("artArrangementRegionHash")]
public uint ArtArrangementRegionHash { get; set; }

[JsonPropertyName("artArrangementRegionIndex")]
public int ArtArrangementRegionIndex { get; set; }

[JsonPropertyName("statHash")]
public uint StatHash { get; set; }

[JsonPropertyName("arrangementIndexByStatValue")]
public Dictionary<int, int> ArrangementIndexByStatValue { get; set; }
}

#if NET6_0_OR_GREATER
[JsonSerializable(typeof(DestinyArrangementRegionFilterDefinition))]
[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)]
internal partial class DestinyArrangementRegionFilterDefinitionJsonContext : JsonSerializerContext { }
#endif

/// <summary>
/// Items like Sacks or Boxes can have items that it shows in-game when you view details that represent the items you can obtain if you use or acquire the item.
/// This defines those categories, and gives some insights into that data's source.
Expand Down Expand Up @@ -4122,6 +4192,11 @@ public class DestinyPlugItemCraftingRequirements
[JsonPropertyName("unlockRequirements")]
public IEnumerable<Destiny.Definitions.DestinyPlugItemCraftingUnlockRequirement> UnlockRequirements { get; set; }

/// <summary>If the plug has a known level requirement, it'll be available here.</summary>
[JsonPropertyName("requiredLevel")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? RequiredLevel { get; set; }

[JsonPropertyName("materialRequirementHashes")]
public IEnumerable<uint> MaterialRequirementHashes { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ public enum DestinyActivityModeType : int
Sundial = 83,
TrialsOfOsiris = 84,
Dares = 85,
Offensive = 86
Offensive = 86,
LostSector = 87,
Rift = 88,
ZoneControl = 89,
IronBannerRift = 90
}

public class DestinyHistoricalStatsDefinition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ public class DestinyPostGameCarnageReportData
[JsonPropertyName("period")]
public DateTime Period { get; set; }

/// <summary>OBSOLETE - If this activity has "phases", this is the phase at which the activity was started.</summary>
/// <summary>If this activity has "phases", this is the phase at which the activity was started. This value is only valid for activities before the Beyond Light expansion shipped. Subsequent activities will not have a valid value here.</summary>
[JsonPropertyName("startingPhaseIndex")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? StartingPhaseIndex { get; set; }

/// <summary>True if the activity was started from the beginning, if that information is available.</summary>
/// <summary>True if the activity was started from the beginning, if that information is available and the activity was played post Witch Queen release.</summary>
[JsonPropertyName("activityWasStartedFromBeginning")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? ActivityWasStartedFromBeginning { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion BungieSharper.Entities/Destiny/Entities.Destiny.Quests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class DestinyObjectiveProgress
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public uint? ActivityHash { get; set; }

/// <summary>If progress has been made, and the progress can be measured numerically, this will be the value of that progress. You can compare it to the DestinyObjectiveDefinition.completionValue property for current vs. upper bounds, and use DestinyObjectiveDefinition.valueStyle to determine how this should be rendered. Note that progress, in Destiny 2, need not be a literal numeric progression. It could be one of a number of possible values, even a Timestamp. Always examine DestinyObjectiveDefinition.valueStyle before rendering progress.</summary>
/// <summary>If progress has been made, and the progress can be measured numerically, this will be the value of that progress. You can compare it to the DestinyObjectiveDefinition.completionValue property for current vs. upper bounds, and use DestinyObjectiveDefinition.inProgressValueStyle or completedValueStyle to determine how this should be rendered. Note that progress, in Destiny 2, need not be a literal numeric progression. It could be one of a number of possible values, even a Timestamp. Always examine DestinyObjectiveDefinition.inProgressValueStyle or completedValueStyle before rendering progress.</summary>
[JsonPropertyName("progress")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? Progress { get; set; }
Expand Down
8 changes: 6 additions & 2 deletions BungieSharper.Entities/Destiny/Entities.Destiny.cs
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,8 @@ public enum DestinyItemType : int
Bounty = 26,
Wrapper = 27,
SeasonalArtifact = 28,
Finisher = 29
Finisher = 29,
Pattern = 30
}

/// <summary>
Expand Down Expand Up @@ -1524,7 +1525,10 @@ public enum DestinyVendorItemState : int
Popular = 65536,

/// <summary>This indicates that the sale item is free.</summary>
Free = 131072
Free = 131072,

/// <summary>This indicates that the sale item is locked.</summary>
Locked = 262144
}

/// <summary>
Expand Down
10 changes: 10 additions & 0 deletions BungieSharper.Entities/Exceptions/Entities.Exceptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ public enum PlatformErrorCodes : int
NonTransactionalEmailSendFailure = 235,
UnknownErrorSettingGlobalDisplayName = 236,
DuplicateGlobalDisplayName = 237,
ErrorRunningNameValidationChecks = 238,
ErrorDatabaseGlobalName = 239,
ErrorNoAvailableNameChanges = 240,
ErrorNameAlreadySetToInput = 241,
MessagingUnknownError = 300,
MessagingSelfError = 301,
MessagingSendThrottle = 302,
Expand Down Expand Up @@ -747,6 +751,12 @@ public enum PlatformErrorCodes : int
ClanFireteamTooManyOpenScheduledFireteams = 3030,
ClanFireteamCannotReopenScheduledFireteams = 3031,
ClanFireteamJoinNoAccountSpecified = 3032,
ClanFireteamMinDestiny2ProgressForCreation = 3033,
ClanFireteamMinDestiny2ProgressForJoin = 3034,
ClanFireteamSMSOrPurchaseRequiredCreate = 3035,
ClanFireteamPurchaseRequiredCreate = 3036,
ClanFireteamSMSOrPurchaseRequiredJoin = 3037,
ClanFireteamPurchaseRequiredJoin = 3038,
CrossSaveOverriddenAccountNotFound = 3200,
CrossSaveTooManyOverriddenPlatforms = 3201,
CrossSaveNoOverriddenPlatforms = 3202,
Expand Down
112 changes: 112 additions & 0 deletions BungieSharper.Entities/Tokens/Entities.Tokens.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,116 @@ public class PartnerOfferHistoryResponse
[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)]
internal partial class PartnerOfferHistoryResponseJsonContext : JsonSerializerContext { }
#endif

public class BungieRewardDisplay
{
[JsonPropertyName("UserRewardAvailabilityModel")]
public Tokens.UserRewardAvailabilityModel UserRewardAvailabilityModel { get; set; }

[JsonPropertyName("ObjectiveDisplayProperties")]
public Tokens.RewardDisplayProperties ObjectiveDisplayProperties { get; set; }

[JsonPropertyName("RewardDisplayProperties")]
public Tokens.RewardDisplayProperties RewardDisplayProperties { get; set; }
}

#if NET6_0_OR_GREATER
[JsonSerializable(typeof(BungieRewardDisplay))]
[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)]
internal partial class BungieRewardDisplayJsonContext : JsonSerializerContext { }
#endif

public class UserRewardAvailabilityModel
{
[JsonPropertyName("AvailabilityModel")]
public Tokens.RewardAvailabilityModel AvailabilityModel { get; set; }

[JsonPropertyName("IsAvailableForUser")]
public bool IsAvailableForUser { get; set; }

[JsonPropertyName("IsUnlockedForUser")]
public bool IsUnlockedForUser { get; set; }
}

#if NET6_0_OR_GREATER
[JsonSerializable(typeof(UserRewardAvailabilityModel))]
[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)]
internal partial class UserRewardAvailabilityModelJsonContext : JsonSerializerContext { }
#endif

public class RewardAvailabilityModel
{
[JsonPropertyName("HasExistingCode")]
public bool HasExistingCode { get; set; }

[JsonPropertyName("RecordDefinitions")]
public IEnumerable<Destiny.Definitions.Records.DestinyRecordDefinition> RecordDefinitions { get; set; }

[JsonPropertyName("CollectibleDefinitions")]
public IEnumerable<Tokens.CollectibleDefinitions> CollectibleDefinitions { get; set; }

[JsonPropertyName("IsOffer")]
public bool IsOffer { get; set; }

[JsonPropertyName("HasOffer")]
public bool HasOffer { get; set; }

[JsonPropertyName("OfferApplied")]
public bool OfferApplied { get; set; }

[JsonPropertyName("DecryptedToken")]
public string DecryptedToken { get; set; }

[JsonPropertyName("IsLoyaltyReward")]
public bool IsLoyaltyReward { get; set; }

[JsonPropertyName("ShopifyEndDate")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DateTime? ShopifyEndDate { get; set; }

[JsonPropertyName("GameEarnByDate")]
public DateTime GameEarnByDate { get; set; }

[JsonPropertyName("RedemptionEndDate")]
public DateTime RedemptionEndDate { get; set; }
}

#if NET6_0_OR_GREATER
[JsonSerializable(typeof(RewardAvailabilityModel))]
[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)]
internal partial class RewardAvailabilityModelJsonContext : JsonSerializerContext { }
#endif

public class CollectibleDefinitions
{
[JsonPropertyName("CollectibleDefinition")]
public Destiny.Definitions.Collectibles.DestinyCollectibleDefinition CollectibleDefinition { get; set; }

[JsonPropertyName("DestinyInventoryItemDefinition")]
public Destiny.Definitions.DestinyInventoryItemDefinition DestinyInventoryItemDefinition { get; set; }
}

#if NET6_0_OR_GREATER
[JsonSerializable(typeof(CollectibleDefinitions))]
[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)]
internal partial class CollectibleDefinitionsJsonContext : JsonSerializerContext { }
#endif

public class RewardDisplayProperties
{
[JsonPropertyName("Name")]
public string Name { get; set; }

[JsonPropertyName("Description")]
public string Description { get; set; }

[JsonPropertyName("ImagePath")]
public string ImagePath { get; set; }
}

#if NET6_0_OR_GREATER
[JsonSerializable(typeof(RewardDisplayProperties))]
[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)]
internal partial class RewardDisplayPropertiesJsonContext : JsonSerializerContext { }
#endif
}
2 changes: 1 addition & 1 deletion BungieSharper.Tests/BungieSharper.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<IsPackable>false</IsPackable>

<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<VersionPrefix>0.9.0</VersionPrefix>
<VersionPrefix>0.9.1</VersionPrefix>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion BungieSharper/BungieSharper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<EnablePackageValidation>true</EnablePackageValidation>

<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<VersionPrefix>0.9.0</VersionPrefix>
<VersionPrefix>0.9.1</VersionPrefix>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
Loading

0 comments on commit adae8fc

Please sign in to comment.