황성연

최근전적 받아오기, 티어별 엠블렘 이미지 추가

......@@ -257,13 +257,68 @@ module.exports = function(app){
var match_gameId = new Array();
var match_mychamp = new Array();
for(var i=0; i<10; i++){
for(var i=0; i<5; i++){
match_gameId.push(match_json[i].gameId);
match_mychamp.push(match_json[i].champion);
}
console.log(match_gameId);
console.log(match_mychamp);
var match1Url = "https://kr.api.riotgames.com/lol/match/v4/matches/" + match_gameId[0] + "?api_key=" + apikey;
request(match1Url,function(error,response,body){
var match1_json=JSON.parse(body);
console.log(match1_json);
var match2Url = "https://kr.api.riotgames.com/lol/match/v4/matches/" + match_gameId[1] + "?api_key=" + apikey;
request(match2Url,function(error,response,body){
var match2_json=JSON.parse(body);
console.log(match2_json);
var match3Url = "https://kr.api.riotgames.com/lol/match/v4/matches/" + match_gameId[2] + "?api_key=" + apikey;
request(match3Url,function(error,response,body){
var match3_json=JSON.parse(body);
console.log(match3_json);
var match4Url = "https://kr.api.riotgames.com/lol/match/v4/matches/" + match_gameId[3] + "?api_key=" + apikey;
request(match4Url,function(error,response,body){
var match4_json=JSON.parse(body);
console.log(match4_json);
var match5Url = "https://kr.api.riotgames.com/lol/match/v4/matches/" + match_gameId[4] + "?api_key=" + apikey;
request(match5Url,function(error,response,body){
var match5_json=JSON.parse(body);
console.log(match5_json);
......@@ -289,6 +344,12 @@ module.exports = function(app){
c_rank: rank,
c_leaguePoint: leaguePoints
});
});
});
});
});
});
});
});
});
......