Item class
A representation of an in-game item.
Signature:
export declare class Item
Constructor
new Item (client: Client, id: string, data: ItemData)
Constructs a new instance of the Item
class.
Parameters:
Parameter | Type | Description |
---|---|---|
client | Client | The client requesting the data. |
id | String | The ID of the item. |
data | ItemData | The raw item data from data dragon. |
Properties
availability
The list of maps on which you can buy this item.
Type: GameMap
consumable
Whether this item is a consumable.
Consumables give you temporary buffs or vision after consumption.
Type: Boolean
consumeOnFull
Whether this item is automatically consumed if you do not have an available item slot.
Type: Boolean
description
A short-description of this object. plaintext
attribute in the data dragon file.
Type: String
details
More detailed description of the item. This is the processed details. With all the HTML-like tags removed.
See rawDetails if you want the raw data.
Type: String
goldValue
The value of this item in terms of in-game gold.
Type: ItemGoldValue
hideFromAll
Whether this item can be bought from the store.
Type: Boolean
id
The 4-digit unique ID (numerical ID as a string) of the item.
Type: String
image
A link to the image assigned to this item in-game.
Type: String
inStore
Whether this item is listed in the in-game store.
Type: Boolean
kind
The kind of item this is in-game. By default, all items are set to be Basic
. There might be some issues with items that do not have their depth
set in the data dragon JSON.
Type: 'Basic' | 'Epic' | 'Legendary' | 'Mythic'
name
The displayed name of this item.
Type: String
rawDetails
More detailed description of the item. Raw details contain some html-like tags. This is the raw details from the data dragon API.
See details if you want to see it with the tags processed out.
Type: String
requiredChampionId
If this field is defined, then this item can only be bought/owned by this champion.
Type: String
stacks
If this has a value, it means this item can be stacked in the same item slot. The value indicates the quantity of this item you can store in one slot.
Type: Number
stats
A list of stats this item provides. To learn more about these stats, documentation
Type: { key: string: number; }
tags
Some tags assigned to this item.
Type: String
Methods
.from ()
The components of this item. You need to buy these item and spend additional gold to get this item.
Signature:
from(): Promise<Item[]>;
.into ()
A collection of items the current item is a component of.
Signature:
into(): Promise<Item[]>;
.requiredChampion ()
If this is not undefined, then this item can only be bought/owned by this champion.
Signature:
requiredChampion(): Promise<Champion>;
Return type: Promise < Champion >
.specialRecipe ()
If this is defined, you cannot buy this item from the store. Instead, you need to buy the specialRecipe
item and complete a quest to get it.
Signature:
specialRecipe(): Promise<Item | undefined>;
Return type: Promise < Item | Undefined >