Creates a batch of asset objects. Note: this method will not throw an exception APIException. Each builder's response object must be checked for error. @param client client object that makes requests to the core @param builders list of asset builders @return a list of asset and/
(Client client, List<Builder> builders)
| 76 | * @throws JSONException This exception is raised due to malformed json requests or responses. |
| 77 | */ |
| 78 | public static BatchResponse<Asset> createBatch(Client client, List<Builder> builders) |
| 79 | throws ChainException { |
| 80 | for (Builder asset : builders) { |
| 81 | asset.clientToken = UUID.randomUUID().toString(); |
| 82 | } |
| 83 | return client.batchRequest("create-asset", builders, Asset.class, APIException.class); |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Updates tags for multiple assets in a single API call. |