Skip to content

Node.js API wrapper for Hi-Rez Studio's Games (Smite and Paladins)

License

Notifications You must be signed in to change notification settings

paladins-ai/hirez.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hi-Rez.js

js-standard-style

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 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
  • Paladins:
    • PC === process.env.PALADINS_PC_SESSION
    • XBOX === process.env.PALADINS_XBOX_SESSION
    • PS4 === process.env.PALADINS_PS4_SESSION

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
hirez.smite('platform').session.generate()
  .then((res) => {
  // The res variable with be your sessionId
  // It is also assigned to a process.env variable
})

Test the session

hirez.smite('platform').test().then((response) => {
  // Successful or failed response
})

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 God Leaderboard

hirez.smite('platform').getGodLeaderBoard('God Id', 'Queue Id')

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()

About

Node.js API wrapper for Hi-Rez Studio's Games (Smite and Paladins)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%