Skip to content

Commit

Permalink
http-service: lombok item api
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam- committed May 13, 2018
1 parent 274c79a commit aa35b2c
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 270 deletions.
43 changes: 3 additions & 40 deletions http-api/src/main/java/net/runelite/http/api/item/Item.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,50 +24,13 @@
*/
package net.runelite.http.api.item;

import lombok.Data;

@Data
public class Item
{
private int id;
private String name;
private String description;
private ItemType type;

public int getId()
{
return id;
}

public void setId(int id)
{
this.id = id;
}

public String getName()
{
return name;
}

public void setName(String name)
{
this.name = name;
}

public String getDescription()
{
return description;
}

public void setDescription(String description)
{
this.description = description;
}

public ItemType getType()
{
return type;
}

public void setType(ItemType type)
{
this.type = type;
}
}
32 changes: 2 additions & 30 deletions http-api/src/main/java/net/runelite/http/api/item/ItemPrice.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,40 +25,12 @@
package net.runelite.http.api.item;

import java.time.Instant;
import lombok.Data;

@Data
public class ItemPrice
{
private Item item;
private int price;
private Instant time;

public Item getItem()
{
return item;
}

public void setItem(Item item)
{
this.item = item;
}

public int getPrice()
{
return price;
}

public void setPrice(int price)
{
this.price = price;
}

public Instant getTime()
{
return time;
}

public void setTime(Instant time)
{
this.time = time;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
package net.runelite.http.service.item;

import java.time.Instant;
import lombok.Data;
import net.runelite.http.api.item.Item;
import net.runelite.http.api.item.ItemType;

@Data
public class ItemEntry
{
private int id;
Expand All @@ -47,74 +49,4 @@ public Item toItem()
item.setType(type);
return item;
}

public int getId()
{
return id;
}

public void setId(int id)
{
this.id = id;
}

public String getName()
{
return name;
}

public void setName(String name)
{
this.name = name;
}

public String getDescription()
{
return description;
}

public void setDescription(String description)
{
this.description = description;
}

public ItemType getType()
{
return type;
}

public void setType(ItemType type)
{
this.type = type;
}

public byte[] getIcon()
{
return icon;
}

public void setIcon(byte[] icon)
{
this.icon = icon;
}

public byte[] getIcon_large()
{
return icon_large;
}

public void setIcon_large(byte[] icon_large)
{
this.icon_large = icon_large;
}

public Instant getTimestamp()
{
return timestamp;
}

public void setTimestamp(Instant timestamp)
{
this.timestamp = timestamp;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,51 +25,13 @@
package net.runelite.http.service.item;

import java.time.Instant;
import lombok.Data;

@Data
public class PriceEntry
{
private int item;
private int price;
private Instant time;
private Instant fetched_time;

public int getItem()
{
return item;
}

public void setItem(int item)
{
this.item = item;
}

public int getPrice()
{
return price;
}

public void setPrice(int price)
{
this.price = price;
}

public Instant getTime()
{
return time;
}

public void setTime(Instant time)
{
this.time = time;
}

public Instant getFetched_time()
{
return fetched_time;
}

public void setFetched_time(Instant fetched_time)
{
this.fetched_time = fetched_time;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
*/
package net.runelite.http.service.item;

import lombok.Data;
import net.runelite.http.api.item.Item;
import net.runelite.http.api.item.ItemType;

@Data
public class RSItem
{
private int id;
Expand All @@ -36,66 +38,6 @@ public class RSItem
private String icon;
private String icon_large;

public int getId()
{
return id;
}

public void setId(int id)
{
this.id = id;
}

public String getName()
{
return name;
}

public void setName(String name)
{
this.name = name;
}

public String getDescription()
{
return description;
}

public void setDescription(String description)
{
this.description = description;
}

public String getType()
{
return type;
}

public void setType(String type)
{
this.type = type;
}

public String getIcon()
{
return icon;
}

public void setIcon(String icon)
{
this.icon = icon;
}

public String getIcon_large()
{
return icon_large;
}

public void setIcon_large(String icon_large)
{
this.icon_large = icon_large;
}

public Item toItem()
{
Item item = new Item();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,10 @@
*/
package net.runelite.http.service.item;

import lombok.Data;

@Data
public class RSItemResponse
{
private RSItem item;

public RSItem getItem()
{
return item;
}

public void setItem(RSItem item)
{
this.item = item;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,13 @@
package net.runelite.http.service.item;

import java.util.Map;
import lombok.Data;

@Data
public class RSPrices
{
/**
* unix time in ms to price in gp
*/
private Map<Long, Integer> daily;

public Map<Long, Integer> getDaily()
{
return daily;
}

public void setDaily(Map<Long, Integer> daily)
{
this.daily = daily;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,10 @@
package net.runelite.http.service.item;

import java.util.List;
import lombok.Data;

@Data
public class RSSearch
{
private List<RSItem> items;

public List<RSItem> getItems()
{
return items;
}

public void setItems(List<RSItem> items)
{
this.items = items;
}
}

0 comments on commit aa35b2c

Please sign in to comment.