Methods
(inner) checkIfOwnPlayer(playerName, playerTagLine, playerComponent)
- Description:
- Check to see if the player is the one being displayed on profile in order to highlight it with a different class name
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
playerName |
string | |
playerTagLine |
string | |
playerComponent |
HTMLDivElement |
(inner) copyToClipBoard(gameName, tagLine)
- Description:
- Clipboard copy method for summoner name
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
gameName |
string | |
tagLine |
string |
(async, inner) extendMatchHistory(summonerMatchInfo, region, puuid, setSummonerMatchInfo, setIsTempLoading)
- Description:
- Extends match history by fetching the next 10 match entries that come after the last match rendered on the page
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerMatchInfo |
Array.<string> | |
region |
string | |
puuid |
string | |
setSummonerMatchInfo |
React.Dispatch.<React.SetStateAction.<null>> | |
setIsTempLoading |
React.Dispatch.<React.SetStateAction.<null>> |
(async, inner) getAllAssets(summonerMatchInfo, counter, component)
- Description:
- Driver method that sends API calls to fetch all image assets related to the match and the participants
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerMatchInfo |
Array.<Array.<string>> | |
counter |
number | |
component |
HTMLDivElement |
(async, inner) getChampionAssets(championId, insideClass, parentComponent)
- Description:
- Retrieves champion image assets through API call to server to send the static image or to a third party API to retrieve the image and append it to a component
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
championId |
number | |
insideClass |
string | |
parentComponent |
HTMLDivElement |
(async, inner) getGameQueues() → {Map.<number, string>}
- Description:
- API call to retrieve queue ids and their respective names and return a mapping between them
- Source:
Returns:
- Type
- Map.<number, string>
(inner) getGraphDates(summonerMatchInfo, setgraphData)
- Description:
- Formats match info list into an array of value points with labels to display on the LineChart component
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerMatchInfo |
Array.<Array.<string>> | |
setgraphData |
React.Dispatch.<React.SetStateAction.<null>> |
(async, inner) getItemAssets(summonerInfo, divClass, component)
- Description:
- Driver method that sends API call to retrieve item JSON data in order to get icon paths based on item ID
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerInfo |
Array.<string> | |
divClass |
string | |
component |
HTMLDivElement |
(async, inner) getOtherPlayerAssets(participantsInfo, divClass, component)
- Description:
- Creates HTMLDivElement entry to display player name and champion picture retrieved from API call
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
participantsInfo |
Array.<Array.<string>> | |
divClass |
string | |
component |
HTMLDivElement |
(async, inner) getProfileBackground(summonerChampionWinrateInfo, championsInfo)
- Description:
- Searches for the most played champion and fetches its splash art through API call for use in the profile background
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerChampionWinrateInfo |
Object.<number, Object> | |
championsInfo |
Object.<number, string> |
(async, inner) getRuneImage(runeID, isSecondary)
- Description:
- Sends API call to gather JSON data for runes based on it's type (primary or secondary), sends API call to retrieve image from the iconpath in the JSON data and then creates a HTMLImageElement to append the file image
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
runeID |
number | |
isSecondary |
boolean |
(async, inner) getSummonerItemImage(summonerItemData, itemID, baseImageURL) → {HTMLImageElement}
- Description:
- Queries JSON data to get URL for the icon path of a specific item. API call is sent to that URL and a HTMLImageElement is returned with that image on it
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerItemData |
JSON | |
itemID |
number | |
baseImageURL |
string |
Returns:
- Type
- HTMLImageElement
(async, inner) getSummonerRuneAssets(mainRuneID, secondaryRuneID, divClass, component)
- Description:
- Driver method to get rune image files and render HTMLImageElement components
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
mainRuneID |
number | |
secondaryRuneID |
number | |
divClass |
string | |
component |
HTMLDivElement |
(async, inner) getSummonerSpellAssets(summoner1Id, summoner2Id) → {Array.<HTMLImageElement>}
- Description:
- Driver method that gets JSON data from a URL and uses it to get summoner image assets
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summoner1Id |
string | |
summoner2Id |
string |
Returns:
- Type
- Array.<HTMLImageElement>
(async, inner) getSummonerSpellImage(summonerSpellsData, spellID, baseImageURL) → {HTMLImageElement}
- Description:
- Executes API call to get image data and return image component from it
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerSpellsData |
JSON | |
spellID |
string | |
baseImageURL |
string |
Returns:
- Type
- HTMLImageElement
(inner) loadWinrate(gameQueue, winrateNumber)
- Description:
- Driver method to update games played and winrate percentage based on ranked game mode (solo, flex)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
gameQueue |
number | |
winrateNumber |
number |
(async, inner) makeChampionWinrate(summonerChampionWinrateInfo, championsInfo, queueId)
- Description:
- Function that displays champion winrate stats for a specific game queue based on champion mastery info
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerChampionWinrateInfo |
Object.<number, Object> | |
championsInfo |
Object.<number, string> | |
queueId |
number |
(inner) makeMainRoleBadge(summonerMatchInfo) → {React.ComponentType}
- Description:
- Gathers most played position in ranked from summoner match info and displays it on badge
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerMatchInfo |
Array.<Array.<string>> |
Returns:
- Type
- React.ComponentType
(async, inner) makeMatchEntries(summonerMatchInfo, minLimit)
- Description:
- Goes through the list of match info stored and create components with all the relevant match information displayed
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerMatchInfo |
Array.<Array.<string>> | |
minLimit |
number |
(async, inner) makeMatchHistory(summonerMatchInfo, setIsTempLoading)
- Description:
- Driver method to enable spinner in match history block and to then make match history entry components to render in page
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerMatchInfo |
Array.<Array.<string>> | |
setIsTempLoading |
React.Dispatch.<React.SetStateAction.<boolean>> |
(inner) makeMillionBadge(summonerChampionWinrateInfo, championsInfo) → {React.ComponentType}
- Description:
- Iterates first couple champions on their mastery info to determine which ones have a million plus mastery points and then displays it on badge
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerChampionWinrateInfo |
Object.<number, Array.<Object>> | |
championsInfo |
Object.<number, string> |
Returns:
- Type
- React.ComponentType
(inner) makeMostPlayedBadge(summonerChampionWinrateInfo, championsInfo) → {React.ComponentType}
- Description:
- Scans games played on all champs in all modes to determine the top champion with the most games played and then displays it on a badge
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerChampionWinrateInfo |
Object.<number, Array.<Object>> | |
championsInfo |
Object.<number, string> |
Returns:
- Type
- React.ComponentType
(async, inner) makeProfileIcon(summonerInfo)
- Description:
- API call to retrieve the profile icon image and then display it on a profile component
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerInfo |
Array.<string> |
(async, inner) makeRankedEmblem(summonerRankedInfo, containerName)
- Description:
- Fetches ranked emblem image asset through API call to server to send the static image or to a third party API to retrieve the image and append it to a component
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerRankedInfo |
JSON | |
containerName |
string |
(async, inner) makeRankedEmblems(summonerRankedInfo)
- Description:
- Driver method to retrieve ranked emblem image assets and append them to profile components
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerRankedInfo |
Array.<string> |
(inner) makeStreakBadge(summonerMatchInfo) → {React.ComponentType}
- Description:
- Scans games until the win outcome changes to determine if a player is on a winning streak or a losing streak and displays it on a badge
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerMatchInfo |
Array.<Array.<string>> |
Returns:
- Type
- React.ComponentType
(inner) makeSummonerBadges(summonerMatchInfo, summonerChampionWinrateInfo, championsInfo)
- Description:
- Driver method to display badges on profile block that represent key information about the player and his performance
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerMatchInfo |
Array.<Array.<string>> | |
summonerChampionWinrateInfo |
Object.<number, Array.<Object>> | |
championsInfo |
Object.<number, string> |
(async, inner) makeSummonerProfile(summonerInfo, summonerRankedInfo, summonerMatchInfo, summonerChampionWinrateInfo, championsInfo)
- Description:
- Driver method to build the main summoner profile block with info regarding ranked mode and their gameplay
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
summonerInfo |
Array.<string> | |
summonerRankedInfo |
Array.<Array.<string>> | |
summonerMatchInfo |
Array.<Array.<string>> | |
summonerChampionWinrateInfo |
Object.<number, Array.<Object>> | |
championsInfo |
Object.<number, string> |
(inner) resetCopyButton()
- Description:
- Resets tooltip text when hovering over copy to clipboard button
- Source:
(inner) updateProgressBar(elementId, value, text)
- Description:
- Button method to change winrate and games played value on the circular progress bars
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
elementId |
string | |
value |
number | |
text |
string |