loot tracker: batch loot submissions

This commit is contained in:
Adam
2019-08-19 12:15:00 -04:00
parent bd0badf7fc
commit c8ffa3994d
5 changed files with 98 additions and 27 deletions
@@ -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();