loot tracker: batch loot submissions

This commit is contained in:
Adam
2019-08-18 12:26:33 -04:00
parent bd0badf7fc
commit c8ffa3994d
5 changed files with 98 additions and 27 deletions

View File

@@ -53,7 +53,7 @@ public class LootTrackerClient
private final UUID uuid;
public void submit(LootRecord lootRecord)
public void submit(Collection<LootRecord> lootRecords)
{
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("loottracker")
@@ -61,7 +61,7 @@ public class LootTrackerClient
Request request = new Request.Builder()
.header(RuneLiteAPI.RUNELITE_AUTH, uuid.toString())
.post(RequestBody.create(JSON, GSON.toJson(lootRecord)))
.post(RequestBody.create(JSON, GSON.toJson(lootRecords)))
.url(url)
.build();