Overview
TheItem model represents a League of Legends item with all its properties, stats, and crafting relationships. Items are loaded from the Riot Games Data Dragon API and used throughout the game for question generation and validation.
Fields
Unique identifier for the item (e.g., “3078”, “6676”)
Display name of the item (e.g., “Trinity Force”, “Kraken Slayer”)
HTML-formatted description of the item’s effects and passive abilities
Map containing gold cost information with keys:
total(Integer) - Total gold cost of the itembase(Integer) - Base cost excluding component costssell(Integer) - Sell value of the itempurchasable(Boolean) - Whether the item can be purchased
List of item IDs representing the components needed to craft this item. If this field is populated, the item is craftable. Empty or null for basic items.
List of item IDs representing items that can be crafted using this item as a component. Used to build upgrade paths.
Map containing image information with keys:
full(String) - Filename of the full item imagesprite(String) - Sprite sheet filenamegroup(String) - Image groupx(Integer) - X coordinate in spritey(Integer) - Y coordinate in spritew(Integer) - Widthh(Integer) - Height
Map of stat bonuses provided by the item. Keys are stat names (e.g., “FlatPhysicalDamageMod”, “PercentAttackSpeedMod”) and values are the numeric bonuses.
List of category tags for the item (e.g., [“Damage”, “CriticalStrike”, “AttackSpeed”])
Computed field returning the total gold cost from the
gold.total field. Returns 0 if not available.Computed field returning the full CDN URL to the item’s image. Constructed from the
image.full field.Utility Methods
isCraftableItem()
Returnstrue if the item has components (the from field is not empty), indicating it can be crafted from other items.
getComponentCount()
Returns the number of components required to craft this item (length of thefrom list). Returns 0 for non-craftable items.
getTotalCost()
Getter method that returns the computed total cost from thegold map.
getImageUrl()
Getter method that returns the computed full image URL.Example JSON
Item Difficulty Classification
Items are classified by difficulty based on component count:- EASY: 2 components - Simple items like basic tier 2 items
- MEDIUM: 3 components - Most legendary items
- HARD: 4+ components - Complex mythic or legendary items
Notes
- All items are loaded from the Riot Games Data Dragon API on application startup
- The
@JsonIgnoreProperties(ignoreUnknown = true)annotation allows the model to gracefully handle additional fields from the API - Only craftable items (those with the
fromfield populated) are used for game questions - Item images are served from the Data Dragon CDN:
https://ddragon.leagueoflegends.com/cdn/{version}/img/item/{id}.png