Closed bgv2 closed 3 years ago
There was a mistake in the project, the format of profileIcon from ddragon must have changed at some point. It's fixed with the latest version, You should see profileIconId, or profileIconObject if initialized, inside of LeagueAccountInfo.
Example:
LeagueAPI.initialize().then(function(){
LeagueAPI.getSummonerByName('LeagueOfSausage').then(function(accountInfo) {
console.log(accountInfo);
})
});
Result:
LeagueAccountInfo {
...
profileIconObject: {
id: 3872,
image: {
full: '3872.png',
sprite: 'profileicon0.png',
group: 'profileicon',
x: 432,
y: 6528,
w: 48,
h: 48
}
}
}
Thanks, it works! Is there a way to get the current DDragon version that's included in this package programmatically?
I added a method to get the current DDRagon included:
LeagueApi.getDDragonLocalDataVersion
I'm also working on a program that will alert me when DDragon posts a new version - soon, this project will update within 12 hours of a new DDRagon update.
worked great, thanks!
I know the image links are available in DDragon (in profileIcon.json) but I don't know how to get the ID that corresponds to one of those icons.