lol-constants
v2.20.0
Published
League of Legends constants and data resources, such as champion, item, runes reforged, summoner spells.
Downloads
156
Readme
Provides constants and types for League of Legends related stuff within the context of Riot APIs. Types such as ChampionId
, ChampionName
, ItemKey
, RuneId
, SpellName
, Position
, QueueType
, RankedTier
, Region
and more are provided. Certain URLs and URIs are available as constants as well: DataDragonUrls
, PlatformApiUris
, RegionalApiUris
.
Advantages:
- Types
- Four categories — champions, items, runes, summoner spells — are armed with getter functions that exchange between id–key–name such as
getChampionNameByKey
–getChampionIdByName
–getChampionKeyById
- Types can be validated through type-validating functions such as
isChampionName
- Type validation functions such as
isChampionName
and getter functions such asgetChampionNameByKey
are instantaneous $O(1)$ and do not iterate over many elements
Champions
| constants | types | getters | type-validators
| --- | --- | --- | --- |
ChampionIds
, ChampionIdsByName
, ChampionKeys
, ChampionKeysNum
, ChampionNames
| ChampionId
, ChampionKey
, ChampionKeyNum
, ChampionName
| getChampionIdByKey
, getChampionIdByName
, getChampionKeyById
, getChampionKeyByName
, getChampionNameById
, getChampionNameByKey
| isChampionId
, isChampionKey
, isChampionKeyNum
, isChampionName
Items
| constants | types | getters | type-validators
| --- | --- | --- | --- |
BootsItemKeys
, BootsItemKeysNum
, BootsItemNames
, ItemKeys
, ItemKeysNum
, ItemNames
, ItemTypes
, LegendaryItemKeys
, LegendaryItemKeysNum
, LegendaryItemNames
, OrnnItemKeys
, OrnnItemKeysNum
, OrnnItemNames
| BootsItemKey
, BootsItemKeyNum
, BootsItemName
, ItemKey
, ItemKeyNum
, ItemName
, ItemType
, LegendaryItemKey
, LegendaryItemKeyNum
, LegendaryItemName
, OrnnItemKey
, OrnnItemKeyNum
, OrnnItemName
| getItemKeyByName
, getItemNameByKey
| isBootsItemKey
, isBootsItemKeyNum
, isBootsItemName
, isItemKey
, isItemKeyNum
, isItemName
, isItemType
, isLegendaryItemKey
, isLegendaryItemKeyNum
, isLegendaryItemName
, isOrnnItemKey
, isOrnnItemKeyNum
, isOrnnItemName
Runes
| constants | types | getters | type-validators
| --- | --- | --- | --- |
KeystoneIds
, KeystoneIdsNum
, KeystoneNames
, NonStatRuneIds
, NonStatRuneIdsNum
, NonStatRuneNames
, PrimaryRuneTrees
, PrimaryRuneTreesByRuneNames
, PrimaryRuneTreesByRuneNamesNum
, RuneHSets
, RuneHSetsByRuneNames
, RuneHSetsByRuneNamesNum
, RuneIconFileNames
, RuneIds
, RuneIdsNum
, RuneNames
, RunePickingRelationships
, RuneSets
, RuneSetsByRuneNames
, RuneSetsByRuneNamesNum
, RuneTreeIds
, RuneTreeIdsNum
, RuneTreeNames
, RuneTreeTypes
, SecondaryRuneTrees
, SecondaryRuneTreesByRuneNames
, SecondaryRuneTreesByRuneNamesNum
, StatRuneHSets
, StatRuneHSetsByRuneNames
, StatRuneHSetsByRuneNamesNum
, StatRuneIds
, StatRuneIdsNum
, StatRuneNames
| NonStatRuneId
, NonStatRuneIdNum
, NonStatRuneName
, RuneIconFile
, RuneId
, RuneIdNum
, RuneName
, RuneTreeId
, RuneTreeIdNum
, RuneTreeName
, RuneTreeType
, StatRuneId
, StatRuneIdNum
, StatRuneName
| getNonStatRuneIdByName
, getNonStatRuneNameById
, getRuneCategoryName
, getRuneCdnUrl
, getRuneIdByName
, getRuneNameById
, getRuneTreeIdByName
, getRuneTreeIdNumByName
, getRuneTreeNameById
, getStatRuneIdByName
, getStatRuneNameById
| isDominationRuneId
, isDominationRuneIdNum
, isDominationRuneName
, isInspirationRuneId
, isInspirationRuneIdNum
, isInspirationRuneName
, isKeystoneRuneId
, isKeystoneRuneIdNum
, isKeystoneRuneName
, isNonStatRuneId
, isNonStatRuneIdNum
, isNonStatRuneName
, isPrecisionRuneId
, isPrecisionRuneIdNum
, isPrecisionRuneName
, isResolveRuneId
, isResolveRuneIdNum
, isResolveRuneName
, isRuneId
, isRuneIdNum
, isRuneName
, isRuneTreeId
, isRuneTreeIdNum
, isRuneTreeName
, isRuneTreeType
, isSorceryRuneId
, isSorceryRuneIdNum
, isSorceryRuneName
, isStatRuneId
, isStatRuneIdNum
, isStatRuneName
Summoner spells
| constants | types | getters | type-validators
| --- | --- | --- | --- |
SpellIds
, SpellIdsByName
, SpellKeys
, SpellKeysNum
, SpellNames
| SpellId
, SpellKey
, SpellKeyNum
, SpellName
| getSpellIdByKey
, getSpellIdByName
, getSpellKeyById
, getSpellKeyByName
, getSpellNameById
, getSpellNameByKey
| isSpellId
, isSpellKey
, isSpellKeyNum
, isSpellName
Other
| constants | types | type-validators
| --- | --- | --- |
BuildingTypes
, Continents
, DataDragonUrls
, DragonTypes
, GameModes
, GameTypes
, KillTypes
, Lanes
, LaneTypes
, Levels
, Locales
, MapIds
, MonsterTypes
, ParticipantIds
, PlatformApiUris
, PlatformIds
, Positions
, QueueDescriptions:
, QueueIds
, QueueTypes
, RankedRanks
, RankedTiers
, RegionalApiUris
, Regions
, RelativeTeams
, Roles
, Skills
, SkillSlots
, TeamIds
, TowerTypes
, WardTypes
| BuildingType
, Continent
, DragonType
, GameMode
, GameType
, KillType
, Lane
, LaneType
, Level
, Locale
, MapId
, MonsterType
, ParticipantId
, PlatformApiUri
, PlatformId
, Position
, QueueId
, QueueType
, RankedRank
, RankedTier
, RegionalApiUri
, Region
, RelativeTeam
, Role
, Skill
, SkillSlot
, TeamId
, TowerType
, WardType
| isBuildingType
, isContinent
, isDragonType
, isGameMode
, isGameType
, isKillType
, isLane
, isLaneType
, isLevel
, isLocale
, isMapId
, isMonsterType
, isParticipantId
, isPlatformApiUri
, isPlatformId
, getPlatformIdByRegion
, isPosition
, isQueueId
, isQueueType
, isRankedRank
, isRankedTier
, isRegionalApiUri
, isRegion
, getRegionByPlatformId
, isRelativeTeam
, isRole
, isSkill
, isSkillSlot
, isTeamId
, isTowerType
, isWardType