Add telemetry support
Closed this issue · 6 comments
Right now the parser.js
file removes the included
data from the match, which contains all the information about where to fetch the telemetry from an online URL. Please do not discard that information, so that the final match that the Vainglory JS API returns contains the telemetry information. Thanks!
I've added support for telemetry data with v1.0.0- it should work out of the box. Let me know if that works for you 👍
Just tested -- works great, thank you for the super-fast turnaround time!
Also just updated (v1.0.1) with a .resolve()
helper that will return the data that is associated with the data URL.
const matchId = 'f5373c40-0aa9-11e7-bcff-0667892d829e';
vainglory.matches.single(matchId).then(async (match) => {
const telemetry = await match.assets[0].resolve();
console.log(telemetry);
}).catch((err) => console.error(err));
👍
Without await
, is that just match.assets[0].resolve((telemetry) => doStuff(telemetry));
?
it's just a promise, so something like;
match.assets[0].resolve().then(telemetry => doStuff(telemetry));
Ah, right, thanks!