-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from TreasureProject/develop
v0.2.4
- Loading branch information
Showing
7 changed files
with
125 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Numerics; | ||
using System.Threading.Tasks; | ||
|
||
namespace Treasure | ||
{ | ||
[Serializable] | ||
public struct CorruptionRemovalRecipe | ||
{ | ||
public struct Item | ||
{ | ||
public string address; | ||
public List<int> tokenIds; | ||
public BigInteger amount; | ||
public string customHandler; | ||
} | ||
|
||
public string id; | ||
public BigInteger corruptionRemoved; | ||
public List<Item> items; | ||
} | ||
|
||
public struct CorruptionRemovalRequest | ||
{ | ||
public string recipeId; | ||
public BigInteger[] tokenIds; | ||
} | ||
|
||
public struct CorruptionRemoval | ||
{ | ||
public string requestId; | ||
// TODO: change this to enum? Started | Ready | ||
public string status; | ||
} | ||
|
||
[Serializable] | ||
public struct HarvesterCorruptionRemoval | ||
{ | ||
public List<CorruptionRemovalRecipe> corruptionRemovalRecipes; | ||
public List<InventoryToken> userInventoryCorruptionRemovalRecipeItems; | ||
public List<CorruptionRemoval> userCorruptionRemovals; | ||
} | ||
|
||
public partial class API | ||
{ | ||
public async Task<HarvesterCorruptionRemoval> GetHarvesterCorruptionRemoval(string id) | ||
{ | ||
var response = await Get($"/harvesters/{id}/corruption-removal"); | ||
return JsonConvert.DeserializeObject<HarvesterCorruptionRemoval>(response); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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