-
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.
* Add wallet explorer endpoint --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
0995c46
commit 0c983af
Showing
11 changed files
with
198 additions
and
9 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,42 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
using Swashbuckle.AspNetCore.Annotations; | ||
using UniversalNFT.dev.API.Models.API; | ||
using UniversalNFT.dev.API.Services.NFT; | ||
using UniversalNFT.dev.API.SwaggerConfig; | ||
|
||
namespace UniversalNFT.dev.API.Controllers | ||
{ | ||
/// <summary> | ||
/// Return all NFTs in a specific wallet in our UniversalNFTResponseV1 format. | ||
/// </summary> | ||
[ApiController] | ||
[Route("v1.0/Wallet")] | ||
public class WalletController : ControllerBase | ||
{ | ||
private readonly INFTService _nftService; | ||
|
||
public WalletController(INFTService nftService) | ||
{ | ||
_nftService = nftService; | ||
} | ||
|
||
/// <summary> | ||
/// Return all NFTs in a wallet in our UniversalNFTResponseV1 format. | ||
/// </summary> | ||
[HttpGet] | ||
[SwaggerResponse(200, "The wallet NFTs are loaded and thumbnail cached sucessfully", typeof(IEnumerable<UniversalNFTResponseV1>))] | ||
[SwaggerResponse(404, "The wallet could not be found")] | ||
public async Task<IActionResult> Get( | ||
[SwaggerParameter("The XRPL wallet to load NFTs from", Required = true)] | ||
[SwaggerTryItOutDefaultValue("rPpMSFxzjqJ6AGgEZ8kgbQeeo6UJvUkVmb")] | ||
string OwnerWalletAddress) | ||
{ | ||
var response = await _nftService.GetAllNFTs(OwnerWalletAddress); | ||
|
||
if (response == null) | ||
return NotFound(); | ||
|
||
return new JsonResult(response); | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -18,6 +18,5 @@ public class HttpFacade : IHttpFacade | |
|
||
return null; | ||
} | ||
|
||
} | ||
} |
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
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