The /arbitrary/search API endpoint now uses a string instead of an int for the "service", and shows a dropdown of possible values in the API documentation page.

This commit is contained in:
CalDescent
2021-10-31 21:22:51 +00:00
parent 528a838643
commit cbb2dbffb9
2 changed files with 7 additions and 5 deletions

View File

@@ -6,6 +6,8 @@ import org.junit.Before;
import org.junit.Test;
import org.qortal.api.resource.ArbitraryResource;
import org.qortal.api.resource.TransactionsResource.ConfirmationStatus;
import org.qortal.data.transaction.ArbitraryTransactionData;
import org.qortal.data.transaction.ArbitraryTransactionData.Service;
import org.qortal.test.common.ApiCommon;
public class ArbitraryApiTests extends ApiCommon {
@@ -22,7 +24,7 @@ public class ArbitraryApiTests extends ApiCommon {
Integer[] startingBlocks = new Integer[] { null, 0, 1, 999999999 };
Integer[] blockLimits = new Integer[] { null, 0, 1, 999999999 };
Integer[] txGroupIds = new Integer[] { null, 0, 1, 999999999 };
Integer[] services = new Integer[] { null, 0, 1, 999999999 };
ArbitraryTransactionData.Service[] services = new Service[] { Service.WEBSITE, Service.GIT_REPOSITORY, Service.BLOG_COMMENT };
String[] names = new String[] { null, "Test" };
String[] addresses = new String[] { null, this.aliceAddress };
ConfirmationStatus[] confirmationStatuses = new ConfirmationStatus[] { ConfirmationStatus.UNCONFIRMED, ConfirmationStatus.CONFIRMED, ConfirmationStatus.BOTH };
@@ -30,7 +32,7 @@ public class ArbitraryApiTests extends ApiCommon {
for (Integer startBlock : startingBlocks)
for (Integer blockLimit : blockLimits)
for (Integer txGroupId : txGroupIds)
for (Integer service : services)
for (Service service : services)
for (String name : names)
for (String address : addresses)
for (ConfirmationStatus confirmationStatus : confirmationStatuses) {