Skip to content

Commit

Permalink
feat: update immutable zkEVM API package
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Dec 5, 2024
1 parent 572e161 commit d9e8e89
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 39 deletions.
8 changes: 5 additions & 3 deletions src/Packages/ZkEvmApi/Documentation~/MetadataSearchApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ No authorization required

<a id="searchstacks"></a>
# **SearchStacks**
> SearchStacksResult SearchStacks (string chainName, List<string> contractAddress, string? accountAddress = null, bool? onlyIncludeOwnerListings = null, bool? onlyIfHasActiveListings = null, string? traits = null, string? keyword = null, string? sortBy = null, int? pageSize = null, string? pageCursor = null)
> SearchStacksResult SearchStacks (string chainName, List<string> contractAddress, string? accountAddress = null, bool? onlyIncludeOwnerListings = null, bool? onlyIfHasActiveListings = null, string? traits = null, string? keyword = null, string? paymentToken = null, string? sortBy = null, int? pageSize = null, string? pageCursor = null)
Search NFT stacks

Expand Down Expand Up @@ -248,14 +248,15 @@ namespace Example
var onlyIfHasActiveListings = true; // bool? | Filters results to include only stacks that have a current active listing. False and 'null' return all unfiltered stacks. (optional)
var traits = "traits_example"; // string? | JSON encoded traits to filter by. e.g. encodeURIComponent(JSON.stringify({\"rarity\": {\"values\": [\"common\", \"rare\"], \"condition\": \"eq\"}})) (optional)
var keyword = sword; // string? | Keyword to search NFT name and description. Alphanumeric characters only. (optional)
var paymentToken = NATIVE; // string? | Filters the active listings, bids, floor listing and top bid by the specified payment token, either the address of the payment token contract or 'NATIVE' (optional)
var sortBy = "cheapest_first"; // string? | Sort results in a specific order (optional)
var pageSize = 100; // int? | Number of results to return per page (optional) (default to 100)
var pageCursor = "pageCursor_example"; // string? | Encoded page cursor to retrieve previous or next page. Use the value returned in the response. (optional)
try
{
// Search NFT stacks
SearchStacksResult result = apiInstance.SearchStacks(chainName, contractAddress, accountAddress, onlyIncludeOwnerListings, onlyIfHasActiveListings, traits, keyword, sortBy, pageSize, pageCursor);
SearchStacksResult result = apiInstance.SearchStacks(chainName, contractAddress, accountAddress, onlyIncludeOwnerListings, onlyIfHasActiveListings, traits, keyword, paymentToken, sortBy, pageSize, pageCursor);
Debug.WriteLine(result);
}
catch (ApiException e)
Expand All @@ -276,7 +277,7 @@ This returns an ApiResponse object which contains the response data, status code
try
{
// Search NFT stacks
ApiResponse<SearchStacksResult> response = apiInstance.SearchStacksWithHttpInfo(chainName, contractAddress, accountAddress, onlyIncludeOwnerListings, onlyIfHasActiveListings, traits, keyword, sortBy, pageSize, pageCursor);
ApiResponse<SearchStacksResult> response = apiInstance.SearchStacksWithHttpInfo(chainName, contractAddress, accountAddress, onlyIncludeOwnerListings, onlyIfHasActiveListings, traits, keyword, paymentToken, sortBy, pageSize, pageCursor);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
Expand All @@ -300,6 +301,7 @@ catch (ApiException e)
| **onlyIfHasActiveListings** | **bool?** | Filters results to include only stacks that have a current active listing. False and &#39;null&#39; return all unfiltered stacks. | [optional] |
| **traits** | **string?** | JSON encoded traits to filter by. e.g. encodeURIComponent(JSON.stringify({\&quot;rarity\&quot;: {\&quot;values\&quot;: [\&quot;common\&quot;, \&quot;rare\&quot;], \&quot;condition\&quot;: \&quot;eq\&quot;}})) | [optional] |
| **keyword** | **string?** | Keyword to search NFT name and description. Alphanumeric characters only. | [optional] |
| **paymentToken** | **string?** | Filters the active listings, bids, floor listing and top bid by the specified payment token, either the address of the payment token contract or &#39;NATIVE&#39; | [optional] |
| **sortBy** | **string?** | Sort results in a specific order | [optional] |
| **pageSize** | **int?** | Number of results to return per page | [optional] [default to 100] |
| **pageCursor** | **string?** | Encoded page cursor to retrieve previous or next page. Use the value returned in the response. | [optional] |
Expand Down
16 changes: 10 additions & 6 deletions src/Packages/ZkEvmApi/Documentation~/PricingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ All URIs are relative to *https://api.sandbox.immutable.com*

<a id="quotesfornfts"></a>
# **QuotesForNFTs**
> QuotesForNFTsResult QuotesForNFTs (string chainName, string contractAddress, List<string> tokenId, string? pageCursor = null)
> QuotesForNFTsResult QuotesForNFTs (string chainName, string contractAddress, List<string> tokenId, string? paymentToken = null, string? pageCursor = null)
Get pricing data for a list of token ids

Expand All @@ -35,12 +35,13 @@ namespace Example
var chainName = imtbl-zkevm-testnet; // string | The name of chain
var contractAddress = "contractAddress_example"; // string | Contract address for collection that these token ids are on
var tokenId = new List<string>(); // List<string> | List of token ids to get pricing data for
var paymentToken = NATIVE; // string? | Filters the active listings, bids, floor listing and top bid by the specified payment token, either the address of the payment token contract or 'NATIVE'. (optional)
var pageCursor = "pageCursor_example"; // string? | Encoded page cursor to retrieve previous or next page. Use the value returned in the response. (optional)
try
{
// Get pricing data for a list of token ids
QuotesForNFTsResult result = apiInstance.QuotesForNFTs(chainName, contractAddress, tokenId, pageCursor);
QuotesForNFTsResult result = apiInstance.QuotesForNFTs(chainName, contractAddress, tokenId, paymentToken, pageCursor);
Debug.WriteLine(result);
}
catch (ApiException e)
Expand All @@ -61,7 +62,7 @@ This returns an ApiResponse object which contains the response data, status code
try
{
// Get pricing data for a list of token ids
ApiResponse<QuotesForNFTsResult> response = apiInstance.QuotesForNFTsWithHttpInfo(chainName, contractAddress, tokenId, pageCursor);
ApiResponse<QuotesForNFTsResult> response = apiInstance.QuotesForNFTsWithHttpInfo(chainName, contractAddress, tokenId, paymentToken, pageCursor);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
Expand All @@ -81,6 +82,7 @@ catch (ApiException e)
| **chainName** | **string** | The name of chain | |
| **contractAddress** | **string** | Contract address for collection that these token ids are on | |
| **tokenId** | [**List&lt;string&gt;**](string.md) | List of token ids to get pricing data for | |
| **paymentToken** | **string?** | Filters the active listings, bids, floor listing and top bid by the specified payment token, either the address of the payment token contract or &#39;NATIVE&#39;. | [optional] |
| **pageCursor** | **string?** | Encoded page cursor to retrieve previous or next page. Use the value returned in the response. | [optional] |

### Return type
Expand Down Expand Up @@ -112,7 +114,7 @@ No authorization required

<a id="quotesforstacks"></a>
# **QuotesForStacks**
> QuotesForStacksResult QuotesForStacks (string chainName, string contractAddress, List<Guid> stackId, string? pageCursor = null)
> QuotesForStacksResult QuotesForStacks (string chainName, string contractAddress, List<Guid> stackId, string? paymentToken = null, string? pageCursor = null)
Get pricing data for a list of stack ids

Expand All @@ -138,12 +140,13 @@ namespace Example
var chainName = imtbl-zkevm-testnet; // string | The name of chain
var contractAddress = "contractAddress_example"; // string | Contract address for collection that these stacks are on
var stackId = new List<Guid>(); // List<Guid> | List of stack ids to get pricing data for
var paymentToken = NATIVE; // string? | Filters the active listings, bids, floor listing and top bid by the specified payment token, either the address of the payment token contract or 'NATIVE'. (optional)
var pageCursor = "pageCursor_example"; // string? | Encoded page cursor to retrieve previous or next page. Use the value returned in the response. (optional)
try
{
// Get pricing data for a list of stack ids
QuotesForStacksResult result = apiInstance.QuotesForStacks(chainName, contractAddress, stackId, pageCursor);
QuotesForStacksResult result = apiInstance.QuotesForStacks(chainName, contractAddress, stackId, paymentToken, pageCursor);
Debug.WriteLine(result);
}
catch (ApiException e)
Expand All @@ -164,7 +167,7 @@ This returns an ApiResponse object which contains the response data, status code
try
{
// Get pricing data for a list of stack ids
ApiResponse<QuotesForStacksResult> response = apiInstance.QuotesForStacksWithHttpInfo(chainName, contractAddress, stackId, pageCursor);
ApiResponse<QuotesForStacksResult> response = apiInstance.QuotesForStacksWithHttpInfo(chainName, contractAddress, stackId, paymentToken, pageCursor);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
Expand All @@ -184,6 +187,7 @@ catch (ApiException e)
| **chainName** | **string** | The name of chain | |
| **contractAddress** | **string** | Contract address for collection that these stacks are on | |
| **stackId** | [**List&lt;Guid&gt;**](Guid.md) | List of stack ids to get pricing data for | |
| **paymentToken** | **string?** | Filters the active listings, bids, floor listing and top bid by the specified payment token, either the address of the payment token contract or &#39;NATIVE&#39;. | [optional] |
| **pageCursor** | **string?** | Encoded page cursor to retrieve previous or next page. Use the value returned in the response. | [optional] |

### Return type
Expand Down
Loading

0 comments on commit d9e8e89

Please sign in to comment.