Showing
1 changed file
with
16 additions
and
7 deletions
... | @@ -128,9 +128,6 @@ module.exports = function(app){ | ... | @@ -128,9 +128,6 @@ module.exports = function(app){ |
128 | } | 128 | } |
129 | } | 129 | } |
130 | } | 130 | } |
131 | - console.log(rotation_name); | ||
132 | - | ||
133 | - console.log("챔프길이:" + champ_count); | ||
134 | 131 | ||
135 | var userLeagueUrl = "https://kr.api.riotgames.com/lol/league/v4/entries/by-summoner/"+ urlenconde(id)+"?api_key=" + apikey; | 132 | var userLeagueUrl = "https://kr.api.riotgames.com/lol/league/v4/entries/by-summoner/"+ urlenconde(id)+"?api_key=" + apikey; |
136 | request(userLeagueUrl,function(error,response,body){ | 133 | request(userLeagueUrl,function(error,response,body){ |
... | @@ -240,8 +237,6 @@ module.exports = function(app){ | ... | @@ -240,8 +237,6 @@ module.exports = function(app){ |
240 | var spec_selectedChamp_image = new Array(); | 237 | var spec_selectedChamp_image = new Array(); |
241 | 238 | ||
242 | for(var i=0; i<10; i++) { | 239 | for(var i=0; i<10; i++) { |
243 | - if((spec_bannedChamp[i]).championId == -1) | ||
244 | - continue; | ||
245 | 240 | ||
246 | for(var key in champion) { | 241 | for(var key in champion) { |
247 | if(champion.hasOwnProperty(key) && champion[key].key == spec_bannedChamp[i].championId) { | 242 | if(champion.hasOwnProperty(key) && champion[key].key == spec_bannedChamp[i].championId) { |
... | @@ -252,10 +247,23 @@ module.exports = function(app){ | ... | @@ -252,10 +247,23 @@ module.exports = function(app){ |
252 | } | 247 | } |
253 | } | 248 | } |
254 | } | 249 | } |
255 | - console.log(spec_bannedChamp_image); | 250 | + } |
256 | - console.log(spec_selectedChamp_image); | 251 | + |
252 | + var matchUrl = "https://kr.api.riotgames.com/lol/match/v4/matchlists/by-account/" + accountId + "?api_key=" + apikey; | ||
253 | + request(matchUrl,function(error,response,body) { | ||
254 | + var match_json = JSON.parse(body).matches; | ||
255 | + console.log(match_json); | ||
257 | 256 | ||
257 | + var match_gameId = new Array(); | ||
258 | + var match_mychamp = new Array(); | ||
259 | + | ||
260 | + for(var i=0; i<10; i++){ | ||
261 | + match_gameId.push(match_json[i].gameId); | ||
262 | + match_mychamp.push(match_json[i].champion); | ||
258 | } | 263 | } |
264 | + console.log(match_gameId); | ||
265 | + console.log(match_mychamp); | ||
266 | + | ||
259 | 267 | ||
260 | 268 | ||
261 | 269 | ||
... | @@ -288,5 +296,6 @@ module.exports = function(app){ | ... | @@ -288,5 +296,6 @@ module.exports = function(app){ |
288 | }); | 296 | }); |
289 | }); | 297 | }); |
290 | }); | 298 | }); |
299 | + }); | ||
291 | }; | 300 | }; |
292 | 301 | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment