nak-hirez.js v1.1.4
NAK Hi-Rez.js
A fork from https://www.npmjs.com/package/hirez.js
This fork has been modified to be able to use async/await
The examples below have been modified to adapt to the new way
Promise based Object Oriented Node.js API Wrapper for Hi-Rez Studios games. Currently supporting the following games:
- Smite
- Paladins
Supporting all platforms.
Getting Started
Start with
npm install nak-hirez.js --save
Fill out the form here to request access to the api
Initialize the module with a devId and authKey
const Hirez = require('hirez.js')
let hirez = new Hirez({
devId: 'Insert DevId Here',
authKey: 'Insert AuthKey Here'
})
Sessions
I have made this module a little opinionated in that when you generate a Session ID, it will be returned with the promise AND stored in a process.env variable. The variables are as follows:
- Smite:
- PC ===
process.env.SMITE_PC_SESSION
- XBOX ===
process.env.SMITE_XBOX_SESSION
- PS4 ===
process.env.SMITE_PS4_SESSION
- PC ===
- Paladins:
- PC ===
process.env.PALADINS_PC_SESSION
- XBOX ===
process.env.PALADINS_XBOX_SESSION
- PS4 ===
process.env.PALADINS_PS4_SESSION
- PC ===
I did this because I was tired of passing the same few variables to every single call to the api. This library will pass all of those variables for you auto-magically.
Generate a session
The 'smite' reference below can be interchanged with the desired game
- smite
- paladins
Also 'platform' reference can be interchanged with the desired platform
- pc
- xbox
- ps4
let session = await hirez.smite('platform').session.generate()
console.log(session)
Test the session
let session = await hirez.smite('pc').session.generate();
// If you want to see the session
// console.log(session)
let test = await hirez.smite('platform').session.test()
console.log(test)
Get smite gods
let session = await hirez.smite('platform').session.generate()
// If you want to see the session
// console.log(session)
let gods = await hirez.smite('platform').getGods()
console.log(gods)
Smite
Get Friends
hirez.smite('platform').getFriends('Username')
Get Esports Pro League Details
hirez.smite('platform').getEsportsProLeagueDetails()
Get God Ranks
hirez.smite('platform').getGodRanks('Username')
Get Gods
hirez.smite('platform').getGods()
Get God Skins
hirez.smite('platform').getGodSkins('God Id')
Get God Recommended Items
hirez.smite('platform').getGodRecommendedItems('God Id')
Get Items
hirez.smite('platform').getItems()
Get Match Details
hirez.smite('platform').getMatchDetails('Match Id')
Get Player Match Details
hirez.smite('platform').getMatchPlayerDetails('Match Id')
Get Match Ids By Queue
hirez.smite('platform').getMatchIdsByQueue('Queue Id', 'Date', 'Time')
Get League Leaderboard
hirez.smite('platform').getLeagueLeaderBoard('Queue Id', 'Tier', 'Season')
Get League Seasons
hirez.smite('platform').getLeagueSeasons('Queue Id')
Get Match History
hirez.smite('platform').getMatchHistory('Username')
Get Match of the Day (MotD)
hirez.smite('platform').getMotd()
Get Player
hirez.smite('platform').getPlayer('Username')
Get Player Status
hirez.smite('platform').getPlayerStatus('Username')
Get Queue Stats
hirez.smite('platform').getQueueStats('Username', 'Queue Id')
Get Team Details
hirez.smite('platform').getTeamDetails('Team Id')
Get Team Players
hirez.smite('platform').getTeamPlayers('Team Id')
Get Top Matches
hirez.smite('platform').getTopMatches()
Search Teams
hirez.smite('platform').searchTeams('Search Term')
Get Player Achievements
hirez.smite('platform').getPlayerAchievements('Player Id')
Get Patch Version
hirez.smite('platform').getPatchInfo()
Ping API Webservice
hirez.smite('platform').ping()
Get Data Used
hirez.smite('platform').getDataUsed()
Paladins
Get Friends
hirez.paladins('platform').getFriends('Username')
Get Champion Ranks
hirez.paladins('platform').getChampionRanks('Username')
Get Champions
hirez.paladins('platform').getChampions()
Get Champion Skins
hirez.paladins('platform').getChampionSkins('Champion Id')
Get Items
hirez.paladins('platform').getItems()
Get Match Details
hirez.paladins('platform').getMatchDetails('Match Id')
Get Match History
hirez.paladins('platform').getMatchHistory('Username')
Get Player
hirez.paladins('platform').getPlayer('Username')
Get Player Status
hirez.paladins('platform').getPlayerStatus('Username')
Get Player Achievements
hirez.paladins('platform').getPlayerAchievements('Player Id')
Get Patch Info
hirez.paladins('platform').getPatchInfo()
Ping API Webservice
hirez.paladins('platform').ping()
Get Data Used
hirez.paladins('platform').getDataUsed()