Skip to content

Commit fce7dbc

Browse files
authored
Merge pull request #366 from immutable/feat/update-zkevm-api-2024-12-05-10-05-33
feat: update immutable zkEVM API package
2 parents 572e161 + d9e8e89 commit fce7dbc

File tree

5 files changed

+126
-39
lines changed

5 files changed

+126
-39
lines changed

src/Packages/ZkEvmApi/Documentation~/MetadataSearchApi.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ No authorization required
218218

219219
<a id="searchstacks"></a>
220220
# **SearchStacks**
221-
> 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)
221+
> 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)
222222
223223
Search NFT stacks
224224

@@ -248,14 +248,15 @@ namespace Example
248248
var onlyIfHasActiveListings = true; // bool? | Filters results to include only stacks that have a current active listing. False and 'null' return all unfiltered stacks. (optional)
249249
var traits = "traits_example"; // string? | JSON encoded traits to filter by. e.g. encodeURIComponent(JSON.stringify({\"rarity\": {\"values\": [\"common\", \"rare\"], \"condition\": \"eq\"}})) (optional)
250250
var keyword = sword; // string? | Keyword to search NFT name and description. Alphanumeric characters only. (optional)
251+
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)
251252
var sortBy = "cheapest_first"; // string? | Sort results in a specific order (optional)
252253
var pageSize = 100; // int? | Number of results to return per page (optional) (default to 100)
253254
var pageCursor = "pageCursor_example"; // string? | Encoded page cursor to retrieve previous or next page. Use the value returned in the response. (optional)
254255
255256
try
256257
{
257258
// Search NFT stacks
258-
SearchStacksResult result = apiInstance.SearchStacks(chainName, contractAddress, accountAddress, onlyIncludeOwnerListings, onlyIfHasActiveListings, traits, keyword, sortBy, pageSize, pageCursor);
259+
SearchStacksResult result = apiInstance.SearchStacks(chainName, contractAddress, accountAddress, onlyIncludeOwnerListings, onlyIfHasActiveListings, traits, keyword, paymentToken, sortBy, pageSize, pageCursor);
259260
Debug.WriteLine(result);
260261
}
261262
catch (ApiException e)
@@ -276,7 +277,7 @@ This returns an ApiResponse object which contains the response data, status code
276277
try
277278
{
278279
// Search NFT stacks
279-
ApiResponse<SearchStacksResult> response = apiInstance.SearchStacksWithHttpInfo(chainName, contractAddress, accountAddress, onlyIncludeOwnerListings, onlyIfHasActiveListings, traits, keyword, sortBy, pageSize, pageCursor);
280+
ApiResponse<SearchStacksResult> response = apiInstance.SearchStacksWithHttpInfo(chainName, contractAddress, accountAddress, onlyIncludeOwnerListings, onlyIfHasActiveListings, traits, keyword, paymentToken, sortBy, pageSize, pageCursor);
280281
Debug.Write("Status Code: " + response.StatusCode);
281282
Debug.Write("Response Headers: " + response.Headers);
282283
Debug.Write("Response Body: " + response.Data);
@@ -300,6 +301,7 @@ catch (ApiException e)
300301
| **onlyIfHasActiveListings** | **bool?** | Filters results to include only stacks that have a current active listing. False and &#39;null&#39; return all unfiltered stacks. | [optional] |
301302
| **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] |
302303
| **keyword** | **string?** | Keyword to search NFT name and description. Alphanumeric characters only. | [optional] |
304+
| **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] |
303305
| **sortBy** | **string?** | Sort results in a specific order | [optional] |
304306
| **pageSize** | **int?** | Number of results to return per page | [optional] [default to 100] |
305307
| **pageCursor** | **string?** | Encoded page cursor to retrieve previous or next page. Use the value returned in the response. | [optional] |

src/Packages/ZkEvmApi/Documentation~/PricingApi.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ All URIs are relative to *https://api.sandbox.immutable.com*
99

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

@@ -35,12 +35,13 @@ namespace Example
3535
var chainName = imtbl-zkevm-testnet; // string | The name of chain
3636
var contractAddress = "contractAddress_example"; // string | Contract address for collection that these token ids are on
3737
var tokenId = new List<string>(); // List<string> | List of token ids to get pricing data for
38+
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)
3839
var pageCursor = "pageCursor_example"; // string? | Encoded page cursor to retrieve previous or next page. Use the value returned in the response. (optional)
3940
4041
try
4142
{
4243
// Get pricing data for a list of token ids
43-
QuotesForNFTsResult result = apiInstance.QuotesForNFTs(chainName, contractAddress, tokenId, pageCursor);
44+
QuotesForNFTsResult result = apiInstance.QuotesForNFTs(chainName, contractAddress, tokenId, paymentToken, pageCursor);
4445
Debug.WriteLine(result);
4546
}
4647
catch (ApiException e)
@@ -61,7 +62,7 @@ This returns an ApiResponse object which contains the response data, status code
6162
try
6263
{
6364
// Get pricing data for a list of token ids
64-
ApiResponse<QuotesForNFTsResult> response = apiInstance.QuotesForNFTsWithHttpInfo(chainName, contractAddress, tokenId, pageCursor);
65+
ApiResponse<QuotesForNFTsResult> response = apiInstance.QuotesForNFTsWithHttpInfo(chainName, contractAddress, tokenId, paymentToken, pageCursor);
6566
Debug.Write("Status Code: " + response.StatusCode);
6667
Debug.Write("Response Headers: " + response.Headers);
6768
Debug.Write("Response Body: " + response.Data);
@@ -81,6 +82,7 @@ catch (ApiException e)
8182
| **chainName** | **string** | The name of chain | |
8283
| **contractAddress** | **string** | Contract address for collection that these token ids are on | |
8384
| **tokenId** | [**List&lt;string&gt;**](string.md) | List of token ids to get pricing data for | |
85+
| **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] |
8486
| **pageCursor** | **string?** | Encoded page cursor to retrieve previous or next page. Use the value returned in the response. | [optional] |
8587

8688
### Return type
@@ -112,7 +114,7 @@ No authorization required
112114

113115
<a id="quotesforstacks"></a>
114116
# **QuotesForStacks**
115-
> QuotesForStacksResult QuotesForStacks (string chainName, string contractAddress, List<Guid> stackId, string? pageCursor = null)
117+
> QuotesForStacksResult QuotesForStacks (string chainName, string contractAddress, List<Guid> stackId, string? paymentToken = null, string? pageCursor = null)
116118
117119
Get pricing data for a list of stack ids
118120

@@ -138,12 +140,13 @@ namespace Example
138140
var chainName = imtbl-zkevm-testnet; // string | The name of chain
139141
var contractAddress = "contractAddress_example"; // string | Contract address for collection that these stacks are on
140142
var stackId = new List<Guid>(); // List<Guid> | List of stack ids to get pricing data for
143+
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)
141144
var pageCursor = "pageCursor_example"; // string? | Encoded page cursor to retrieve previous or next page. Use the value returned in the response. (optional)
142145
143146
try
144147
{
145148
// Get pricing data for a list of stack ids
146-
QuotesForStacksResult result = apiInstance.QuotesForStacks(chainName, contractAddress, stackId, pageCursor);
149+
QuotesForStacksResult result = apiInstance.QuotesForStacks(chainName, contractAddress, stackId, paymentToken, pageCursor);
147150
Debug.WriteLine(result);
148151
}
149152
catch (ApiException e)
@@ -164,7 +167,7 @@ This returns an ApiResponse object which contains the response data, status code
164167
try
165168
{
166169
// Get pricing data for a list of stack ids
167-
ApiResponse<QuotesForStacksResult> response = apiInstance.QuotesForStacksWithHttpInfo(chainName, contractAddress, stackId, pageCursor);
170+
ApiResponse<QuotesForStacksResult> response = apiInstance.QuotesForStacksWithHttpInfo(chainName, contractAddress, stackId, paymentToken, pageCursor);
168171
Debug.Write("Status Code: " + response.StatusCode);
169172
Debug.Write("Response Headers: " + response.Headers);
170173
Debug.Write("Response Body: " + response.Data);
@@ -184,6 +187,7 @@ catch (ApiException e)
184187
| **chainName** | **string** | The name of chain | |
185188
| **contractAddress** | **string** | Contract address for collection that these stacks are on | |
186189
| **stackId** | [**List&lt;Guid&gt;**](Guid.md) | List of stack ids to get pricing data for | |
190+
| **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] |
187191
| **pageCursor** | **string?** | Encoded page cursor to retrieve previous or next page. Use the value returned in the response. | [optional] |
188192

189193
### Return type

0 commit comments

Comments
 (0)