황성연

대전기록 데이터 맵핑

...@@ -285,7 +285,6 @@ module.exports = function(app){ ...@@ -285,7 +285,6 @@ module.exports = function(app){
285 var match1Url = "https://kr.api.riotgames.com/lol/match/v4/matches/" + match_gameId[0] + "?api_key=" + apikey; 285 var match1Url = "https://kr.api.riotgames.com/lol/match/v4/matches/" + match_gameId[0] + "?api_key=" + apikey;
286 request(match1Url,function(error,response,body){ 286 request(match1Url,function(error,response,body){
287 var match1_json = JSON.parse(body); 287 var match1_json = JSON.parse(body);
288 - console.log(match1_json);
289 var match1_gameLength = match_json.gameDuration; 288 var match1_gameLength = match_json.gameDuration;
290 var match1_teams = match1_json.teams; 289 var match1_teams = match1_json.teams;
291 var match1_participants = match1_json.participants; 290 var match1_participants = match1_json.participants;
...@@ -320,7 +319,6 @@ module.exports = function(app){ ...@@ -320,7 +319,6 @@ module.exports = function(app){
320 }; 319 };
321 match1_kda.push(obj); 320 match1_kda.push(obj);
322 } 321 }
323 - console.log(match1_kda);
324 322
325 for(var i=0; i<10; i++) { 323 for(var i=0; i<10; i++) {
326 for(key in champion) { 324 for(key in champion) {
...@@ -340,10 +338,16 @@ module.exports = function(app){ ...@@ -340,10 +338,16 @@ module.exports = function(app){
340 } 338 }
341 } 339 }
342 } 340 }
343 - console.log(match1_bannedChamp_image); 341 +
344 - console.log(match1_selectedChamp_image); 342 + var match1 = {
345 - console.log(match1_spell_image); 343 + "summonerName" : match1_summonerName,
346 - 344 + "selectedChamp_image" : match1_selectedChamp_image,
345 + "bannedChamp_image" : match1_bannedChamp_image,
346 + "spell_image" : match1_spell_image,
347 + "kda" : match1_kda
348 + };
349 +
350 + console.log(match1);
347 351
348 var match2Url = "https://kr.api.riotgames.com/lol/match/v4/matches/" + match_gameId[1] + "?api_key=" + apikey; 352 var match2Url = "https://kr.api.riotgames.com/lol/match/v4/matches/" + match_gameId[1] + "?api_key=" + apikey;
349 request(match2Url,function(error,response,body){ 353 request(match2Url,function(error,response,body){
......