public final class GrandExchange
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static ImmutableList<java.lang.String> |
CATEGORIES
The categories of
Items on the Grand Exchange. |
| Constructor and Description |
|---|
GrandExchange(Client client)
Creates a new
GrandExchange. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<Category> |
category(int categoryId)
Gets a
Category by its id. |
java.util.Optional<Category> |
category(java.lang.String categoryName)
Gets a
Category by its name. |
java.util.Optional<CategoryPrices> |
categoryPrices(int categoryId,
java.lang.String prefix,
int page)
Gets a set
CategoryPrices based on the Category's id, an item's prefix, and specified page. |
java.util.Optional<CategoryPrices> |
categoryPrices(java.lang.String categoryName,
java.lang.String prefix,
int page)
Gets a set
CategoryPrices based on the Category's name, an item's prefix, and specified page. |
java.util.Optional<GraphingData> |
graphingData(int itemId)
Gets the
GraphingData of an Item. |
java.util.Optional<ItemPriceInformation> |
itemPriceInformation(int itemId)
Gets the
ItemPriceInformation of an Item. |
public static final ImmutableList<java.lang.String> CATEGORIES
Items on the Grand Exchange.public GrandExchange(Client client)
GrandExchange.client - The web-services Client.public java.util.Optional<Category> category(int categoryId) throws java.io.IOException
Category by its id.categoryId - The id of the Category.Optional containing the Category, or Optional.empty() if there is no Category for the Category id.java.io.IOException - If an I/O error occurs.public java.util.Optional<Category> category(java.lang.String categoryName) throws java.io.IOException
Category by its name.categoryName - The name of the Category.Optional containing the Category, or Optional.empty() if there is no Category for the Category name.java.io.IOException - If an I/O error occurs.public java.util.Optional<CategoryPrices> categoryPrices(int categoryId, java.lang.String prefix, int page) throws java.io.IOException
CategoryPrices based on the Category's id, an item's prefix, and specified page.categoryId - The id of the Category.prefix - An item's prefix.page - The page.Optional containing the CategoryPrices, or Optional.empty() if no CategoryPrices were found.java.io.IOException - If an I/O error occurs.public java.util.Optional<CategoryPrices> categoryPrices(java.lang.String categoryName, java.lang.String prefix, int page) throws java.io.IOException
CategoryPrices based on the Category's name, an item's prefix, and specified page.categoryName - The name of the Category.prefix - An item's prefix.page - The page.Optional containing the CategoryPrices, or Optional.empty() if no CategoryPrices were found.java.io.IOException - If an I/O error occurs.public java.util.Optional<GraphingData> graphingData(int itemId) throws java.io.IOException
GraphingData of an Item.itemId - The id of the Item.Optional containing the GraphingData, or Optional.empty() if no GraphingData was found for the Item id.java.io.IOException - If an I/O error occurs.public java.util.Optional<ItemPriceInformation> itemPriceInformation(int itemId) throws java.io.IOException
ItemPriceInformation of an Item.itemId - The id of the Item.Optional containing the ItemPriceInformation, or Optional.empty() if no ItemPriceInformation was found for the Item id.java.io.IOException - If an I/O error occurs.