From 1e72c1e05dfb2e80106914e96751d462e9ba80f1 Mon Sep 17 00:00:00 2001 From: Dudi Edri Date: Wed, 18 Jan 2023 14:55:42 +0200 Subject: [PATCH 1/4] Wrong Block Numbers in Advanced Query Example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c35235..8fc88cd 100644 --- a/README.md +++ b/README.md @@ -325,7 +325,7 @@ ScriptService scriptService = backendService.getScriptService(); ``` ### Advanced Query Example (Preview) -#### Querying a Descending Order of All Address Transactions since Block No. #3168087 to Block No. #3168097 (inclusive), Limited to Maximum of 10 Results. +#### Querying a Descending Order of All Address Transactions since Block No. #42248 to Block No. #69447 (inclusive), Limited to Maximum of 10 Results. ```java String address = "addr_test1qrvaadv0h7atv366u6966u4rft2svjlf5uajy8lkpsgdrc24rnskuetxz2u3m5ac22s3njvftxcl2fc8k8kjr088ge0qz98xmv"; From 7ab55c2e0a33a742aeb662b57fd6d3e1864f61d3 Mon Sep 17 00:00:00 2001 From: combineads Date: Wed, 18 Jan 2023 22:01:31 +0900 Subject: [PATCH 2/4] Add options in asset policy info API (#106) --- .../rest/koios/client/backend/api/asset/AssetService.java | 3 ++- .../rest/koios/client/backend/api/asset/api/AssetApi.java | 2 +- .../koios/client/backend/api/asset/impl/AssetServiceImpl.java | 4 ++-- .../backend/api/asset/AssetServiceMainnetIntegrationTest.java | 4 ++-- .../backend/api/asset/AssetServicePreprodIntegrationTest.java | 4 ++-- .../backend/api/asset/AssetServicePreviewIntegrationTest.java | 4 ++-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main/java/rest/koios/client/backend/api/asset/AssetService.java b/src/main/java/rest/koios/client/backend/api/asset/AssetService.java index 1237c44..1aa9c8d 100644 --- a/src/main/java/rest/koios/client/backend/api/asset/AssetService.java +++ b/src/main/java/rest/koios/client/backend/api/asset/AssetService.java @@ -64,10 +64,11 @@ public interface AssetService { *

404 - The server does not recognise the combination of endpoint and parameters provided * * @param assetPolicy Asset Policy ID in hexadecimal format (hex) (required) + * @param options Filtering and Pagination options (optional) * @return Result of Type List of {@link PolicyAsset} * @throws ApiException if an error occurs while attempting to invoke the API */ - Result> getAssetPolicyInformation(String assetPolicy) throws ApiException; + Result> getAssetPolicyInformation(String assetPolicy, Options options) throws ApiException; /** * Asset Information diff --git a/src/main/java/rest/koios/client/backend/api/asset/api/AssetApi.java b/src/main/java/rest/koios/client/backend/api/asset/api/AssetApi.java index ef07f6f..7732880 100644 --- a/src/main/java/rest/koios/client/backend/api/asset/api/AssetApi.java +++ b/src/main/java/rest/koios/client/backend/api/asset/api/AssetApi.java @@ -28,7 +28,7 @@ public interface AssetApi { Call> getAssetHistory(@Query("_asset_policy") String assetPolicy, @Query("_asset_name") String assetName, @QueryMap Map paramsMap); @GET("asset_policy_info") - Call> getAssetPolicyInformation(@Query("_asset_policy") String assetPolicy); + Call> getAssetPolicyInformation(@Query("_asset_policy") String assetPolicy, @QueryMap Map paramsMap); @GET("asset_summary") Call> getAssetSummary(@Query("_asset_policy") String assetPolicy, @Query("_asset_name") String assetName); diff --git a/src/main/java/rest/koios/client/backend/api/asset/impl/AssetServiceImpl.java b/src/main/java/rest/koios/client/backend/api/asset/impl/AssetServiceImpl.java index fa9be26..5bbd444 100644 --- a/src/main/java/rest/koios/client/backend/api/asset/impl/AssetServiceImpl.java +++ b/src/main/java/rest/koios/client/backend/api/asset/impl/AssetServiceImpl.java @@ -82,9 +82,9 @@ public Result> getAssetHistory(String assetPolicy, String ass } @Override - public Result> getAssetPolicyInformation(String assetPolicy) throws ApiException { + public Result> getAssetPolicyInformation(String assetPolicy, Options options) throws ApiException { validateHexFormat(assetPolicy); - Call> call = assetApi.getAssetPolicyInformation(assetPolicy); + Call> call = assetApi.getAssetPolicyInformation(assetPolicy, optionsToParamMap(options)); try { Response> response = (Response) execute(call); return processResponse(response); diff --git a/src/test/java/rest/koios/client/backend/api/asset/AssetServiceMainnetIntegrationTest.java b/src/test/java/rest/koios/client/backend/api/asset/AssetServiceMainnetIntegrationTest.java index 418f4d7..84060ee 100644 --- a/src/test/java/rest/koios/client/backend/api/asset/AssetServiceMainnetIntegrationTest.java +++ b/src/test/java/rest/koios/client/backend/api/asset/AssetServiceMainnetIntegrationTest.java @@ -107,7 +107,7 @@ void getAssetHistoryBadRequestTest() { @Test void getAssetPolicyInformationTest() throws ApiException { String assetPolicy = "14696a4676909f4e3cb1f2e60e2e08e5abed70caf5c02699be971139"; - Result> assetPolicyInfoResult = assetService.getAssetPolicyInformation(assetPolicy); + Result> assetPolicyInfoResult = assetService.getAssetPolicyInformation(assetPolicy, Options.EMPTY); Assertions.assertTrue(assetPolicyInfoResult.isSuccessful()); Assertions.assertNotNull(assetPolicyInfoResult.getValue()); log.info(assetPolicyInfoResult.getValue().toString()); @@ -116,7 +116,7 @@ void getAssetPolicyInformationTest() throws ApiException { @Test void getAssetPolicyInformationBadRequestTest() { String assetPolicy = "test"; - ApiException exception = assertThrows(ApiException.class, () -> assetService.getAssetPolicyInformation(assetPolicy)); + ApiException exception = assertThrows(ApiException.class, () -> assetService.getAssetPolicyInformation(assetPolicy, Options.EMPTY)); assertInstanceOf(ApiException.class, exception); } diff --git a/src/test/java/rest/koios/client/backend/api/asset/AssetServicePreprodIntegrationTest.java b/src/test/java/rest/koios/client/backend/api/asset/AssetServicePreprodIntegrationTest.java index 12e64a2..3c71aaa 100644 --- a/src/test/java/rest/koios/client/backend/api/asset/AssetServicePreprodIntegrationTest.java +++ b/src/test/java/rest/koios/client/backend/api/asset/AssetServicePreprodIntegrationTest.java @@ -111,7 +111,7 @@ void getAssetHistoryBadRequestTest() { @Test void getAssetPolicyInformationTest() throws ApiException { String assetPolicy = "80de4ee0ffde8ba05726707f2adba0e65963eff5aaba164af358e71b"; - Result> assetPolicyInfoResult = assetService.getAssetPolicyInformation(assetPolicy); + Result> assetPolicyInfoResult = assetService.getAssetPolicyInformation(assetPolicy, Options.EMPTY); Assertions.assertTrue(assetPolicyInfoResult.isSuccessful()); Assertions.assertNotNull(assetPolicyInfoResult.getValue()); log.info(assetPolicyInfoResult.getValue().toString()); @@ -120,7 +120,7 @@ void getAssetPolicyInformationTest() throws ApiException { @Test void getAssetPolicyInformationBadRequestTest() { String assetPolicy = "test"; - ApiException exception = assertThrows(ApiException.class, () -> assetService.getAssetPolicyInformation(assetPolicy)); + ApiException exception = assertThrows(ApiException.class, () -> assetService.getAssetPolicyInformation(assetPolicy, Options.EMPTY)); assertInstanceOf(ApiException.class, exception); } diff --git a/src/test/java/rest/koios/client/backend/api/asset/AssetServicePreviewIntegrationTest.java b/src/test/java/rest/koios/client/backend/api/asset/AssetServicePreviewIntegrationTest.java index db55088..3e77dc1 100644 --- a/src/test/java/rest/koios/client/backend/api/asset/AssetServicePreviewIntegrationTest.java +++ b/src/test/java/rest/koios/client/backend/api/asset/AssetServicePreviewIntegrationTest.java @@ -111,7 +111,7 @@ void getAssetHistoryBadRequestTest() { @Test void getAssetPolicyInformationTest() throws ApiException { String assetPolicy = "9a50f458ebffb4c3f9d6f9f3d45426b2de6cf2512254f4bfa3d8f410"; - Result> assetPolicyInfoResult = assetService.getAssetPolicyInformation(assetPolicy); + Result> assetPolicyInfoResult = assetService.getAssetPolicyInformation(assetPolicy, Options.EMPTY); Assertions.assertTrue(assetPolicyInfoResult.isSuccessful()); Assertions.assertNotNull(assetPolicyInfoResult.getValue()); log.info(assetPolicyInfoResult.getValue().toString()); @@ -120,7 +120,7 @@ void getAssetPolicyInformationTest() throws ApiException { @Test void getAssetPolicyInformationBadRequestTest() { String assetPolicy = "test"; - ApiException exception = assertThrows(ApiException.class, () -> assetService.getAssetPolicyInformation(assetPolicy)); + ApiException exception = assertThrows(ApiException.class, () -> assetService.getAssetPolicyInformation(assetPolicy, Options.EMPTY)); assertInstanceOf(ApiException.class, exception); } From 6dcf35646b370d340f21aee1d9152745fd67f8cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Jan 2023 15:02:00 +0200 Subject: [PATCH 3/4] Bump swagger-annotations from 2.2.7 to 2.2.8 (#104) Bumps swagger-annotations from 2.2.7 to 2.2.8. --- updated-dependencies: - dependency-name: io.swagger.core.v3:swagger-annotations dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5497b17..ad3aa61 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ 2.0.6 2.0.6 4.4 - 2.2.7 + 2.2.8 1.18.24 1.72 7.6.0 From a4976e3087a1f3a26ec8c5d2cefdfa9a8eb2e894 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Jan 2023 15:02:25 +0200 Subject: [PATCH 4/4] Bump junit-jupiter from 5.9.1 to 5.9.2 (#105) Bumps [junit-jupiter](https://github.com/junit-team/junit5) from 5.9.1 to 5.9.2. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.9.1...r5.9.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ad3aa61..1fd04fe 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ 1.18.24 1.72 7.6.0 - 5.9.1 + 5.9.2 3.10.1 3.4.1 2.22.2