Skip to content

Commit

Permalink
Add SetStates API for use with GetListings request (#31)
Browse files Browse the repository at this point in the history
Co-authored-by: Leonardo Custodio <[email protected]>
  • Loading branch information
SamTheBay and leonardocustodio authored Sep 13, 2024
1 parent 38701c1 commit 204ba4c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,14 @@ public GetListings SetTakeAssetId(MultiTokenIdInput? takeAssetId)
{
return SetVariable("takeAssetId", CoreTypes.MultiTokenIdInput, takeAssetId);
}

/// <summary>
/// Sets the listing states that will be returned.
/// </summary>
/// <param name="states">The list of states that you want returned</param>
/// <returns>This request for chaining.</returns>
public GetListings SetStates(params ListingStateEnum[]? states)
{
return SetVariable("states", CoreTypes.ListingStateEnumArray, states);
}
}
12 changes: 12 additions & 0 deletions src/Enjin.Platform.Sdk/Enjin.Platform.Sdk/Schema/CoreTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -331,4 +331,16 @@ public static class CoreTypes
/// String for an array of <c>TransferRecipient</c> type.
/// </summary>
public const string TransferRecipientArray = "[TransferRecipient!]!";

// ListingStateEnum

/// <summary>
/// String for <c>ListingStateEnum</c> type.
/// </summary>
public const string ListingStateEnum = "ListingStateEnum!";

/// <summary>
/// String for an array of <c>ListingStateEnumArray</c> type.
/// </summary>
public const string ListingStateEnumArray = "[ListingStateEnum!]!";
}

0 comments on commit 204ba4c

Please sign in to comment.