황성연

MATCH-V4 api 추가

......@@ -128,9 +128,6 @@ module.exports = function(app){
}
}
}
console.log(rotation_name);
console.log("챔프길이:" + champ_count);
var userLeagueUrl = "https://kr.api.riotgames.com/lol/league/v4/entries/by-summoner/"+ urlenconde(id)+"?api_key=" + apikey;
request(userLeagueUrl,function(error,response,body){
......@@ -240,8 +237,6 @@ module.exports = function(app){
var spec_selectedChamp_image = new Array();
for(var i=0; i<10; i++) {
if((spec_bannedChamp[i]).championId == -1)
continue;
for(var key in champion) {
if(champion.hasOwnProperty(key) && champion[key].key == spec_bannedChamp[i].championId) {
......@@ -252,13 +247,26 @@ module.exports = function(app){
}
}
}
console.log(spec_bannedChamp_image);
console.log(spec_selectedChamp_image);
}
var matchUrl = "https://kr.api.riotgames.com/lol/match/v4/matchlists/by-account/" + accountId + "?api_key=" + apikey;
request(matchUrl,function(error,response,body) {
var match_json = JSON.parse(body).matches;
console.log(match_json);
var match_gameId = new Array();
var match_mychamp = new Array();
for(var i=0; i<10; i++){
match_gameId.push(match_json[i].gameId);
match_mychamp.push(match_json[i].champion);
}
console.log(match_gameId);
console.log(match_mychamp);
......@@ -281,6 +289,7 @@ module.exports = function(app){
c_rank: rank,
c_leaguePoint: leaguePoints
});
});
});
});
});
......