-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update recipes to schema 2022-03-09T02:00:00.000Z to support currency…
… items
- Loading branch information
Showing
7 changed files
with
133 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,40 @@ | ||
using System; | ||
using Gw2Sharp.WebApi.V2.Clients; | ||
|
||
namespace Gw2Sharp.WebApi.V2.Models | ||
{ | ||
/// <summary> | ||
/// Represents a recipe ingredient. | ||
/// </summary> | ||
public class RecipeIngredient | ||
{ | ||
/// <inheritdoc cref="Id"/> | ||
[Obsolete("Deprecated since schema version 2022-03-09T02:00:00.000Z. Use Id instead. This will be removed from Gw2Sharp starting from version 2.0.")] | ||
public int ItemId | ||
{ | ||
get => this.Id; | ||
set => this.Id = value; | ||
} | ||
|
||
/// <summary> | ||
/// The item id. | ||
/// Can be resolved against <see cref="IGw2WebApiV2Client.Items"/>. | ||
/// The ingredient id. | ||
/// Can be resolved against: | ||
/// <list type="bullet"> | ||
/// <item><see cref="IGw2WebApiV2Client.Items"/> when <see cref="Type"/> is <see cref="RecipeIngredientType.Item"/></item> | ||
/// <item><see cref="IGuildClient.Upgrades"/> when <see cref="Type"/> is <see cref="RecipeIngredientType.GuildUpgrade"/></item> | ||
/// <item><see cref="IGw2WebApiV2Client.Currencies"/> when <see cref="Type"/> is <see cref="RecipeIngredientType.Currency"/></item> | ||
/// </list> | ||
/// </summary> | ||
public int ItemId { get; set; } | ||
public int Id { get; set; } | ||
|
||
/// <summary> | ||
/// The number of items. | ||
/// The ingredient count. | ||
/// </summary> | ||
public int Count { get; set; } | ||
|
||
/// <summary> | ||
/// The ingredient type. | ||
/// </summary> | ||
public ApiEnum<RecipeIngredientType> Type { get; set; } = new(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace Gw2Sharp.WebApi.V2.Models | ||
{ | ||
/// <summary> | ||
/// A recipe ingredient type. | ||
/// </summary> | ||
public enum RecipeIngredientType | ||
{ | ||
/// <summary> | ||
/// Unknown recipe ingredient type. | ||
/// </summary> | ||
Unknown, | ||
|
||
/// <summary> | ||
/// Item ingredient type. | ||
/// </summary> | ||
Item, | ||
|
||
/// <summary> | ||
/// Guild upgrade ingredient type. | ||
/// </summary> | ||
GuildUpgrade, | ||
|
||
/// <summary> | ||
/// Currency ingredient type. | ||
/// </summary> | ||
Currency | ||
} | ||
} |