messyfresh / hirez.js Goto Github PK
View Code? Open in Web Editor NEWNode.js API wrapper for Hi-Rez Studio's Games (Smite and Paladins)
License: MIT License
Node.js API wrapper for Hi-Rez Studio's Games (Smite and Paladins)
License: MIT License
I've been getting unhandled promise rejections consistently. The errors are as follows:
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'startsWith' of undefined
Error occured session: Error: connect ETIMEDOUT [Some ip adress:80]. (Node:9436) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: connect ETIMEDOUT [Some ip adress:80].
The code that gives me this error consistently:
const Hirez = require('hirez.js');
//Obviously removed my devid and authkey
let hirez = new Hirez({
devId: '',
authKey: ''
});const paladins = hirez.paladins('PC');
paladins.session.generate().then((res) => {
paladins.getMatchHistory('Kyran123').then((MatchResult) => { for (let i = 0; i < MatchResult.length; i++) { paladins.getMatchDetails(MatchResult[i].Match).then((MatchDetailsResult) => { for (let j = 0; j < MatchDetailsResult.length; j++) { } }).catch((err) => { console.log('Error occurred match details: ' + err); }); } }).catch((err) => { console.log('Error occurred match id: ' + err); });
}).catch((err) => {
console.log('Error occurred session: ' + err);
});
Sorry that it looks a bit messy, it seems like github doesn't recognize a part of it as code. I've asked friends who are familiar with Node js to check my code and they said it was fine. When I use paladins.ping()
I get that the ping is succesfull. using Paladins.getDataUsed()
I receive 'null'.
hey, this is probably a really simple problem and I'm not seeing the solution because I'm new at this, but I'd appreciate the help nonetheless. Whenever I make calls to the api like getfriends, getgodranks, or getgodinfo, I get returns saying that I have and invalid session ID. I set up the variables like in the example on the readme page. Is there any way the timestamp could be off or something?
[Enhancement] HTTPS Endpoint Update
Awesome work on the existing module!
It appears that HiRez has updated endpoints to use HTTPS instead of HTTP. Feel free to update correspondingly for existing modules.
In your package.json you have declared the main file as index.js
, which does not exists.
https://github.com/messyfresh/hirez.js/blob/master/package.json#L5
Hello, is there way to find the total time played for Paladins ?
Thanks
The saved session id in the wrapper seems to be an object and url generator cant work with that. I suggest fixing it by saving only the id not whole object.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.