Adds constructor for data retrieved from http api (just uses a blank username for now)

Signed-off-by: PKLite <stonewall@pklite.xyz>
This commit is contained in:
PKLite
2019-06-11 21:02:37 -04:00
parent c5fd9e3a6d
commit 70f6d207ac

View File

@@ -26,6 +26,7 @@ package net.runelite.http.api.loottracker;
import java.time.Instant;
import java.util.Collection;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
@@ -42,4 +43,21 @@ public class LootRecord
private LootRecordType type;
private Collection<GameItem> drops;
private Instant time;
/**
* constructor for lootRecords retrieved by http api (doesn't store/retrieve username)
* @param eventId - the eventID or the name/title of the LootRecord
* @param type - The LootRecordType
* @param gameItems - the list of items/quantities
* @param time - the Instant that the Loot Record was received
*/
public LootRecord(String eventId, LootRecordType type, List<GameItem> gameItems, Instant time)
{
// Insert blank username
this.username = "";
this.eventId = eventId;
this.type = type;
this.drops = gameItems;
this.time = time;
}
}