Showing
1 changed file
with
4 additions
and
5 deletions
| ... | @@ -2,7 +2,7 @@ module.exports = function(app){ | ... | @@ -2,7 +2,7 @@ module.exports = function(app){ |
| 2 | 2 | ||
| 3 | var request = require("request"); | 3 | var request = require("request"); |
| 4 | var urlenconde = require('urlencode'); | 4 | var urlenconde = require('urlencode'); |
| 5 | -var apikey = "RGAPI-83bf5bd8-d355-48f2-8531-d33c1befa920"//api | 5 | +var apikey = "RGAPI-a7c53f9b-e980-42b3-af78-a3bc291bec7a"//api |
| 6 | 6 | ||
| 7 | var profileIconId; //아이콘 번호 | 7 | var profileIconId; //아이콘 번호 |
| 8 | var revisionDate; //수정날짜 | 8 | var revisionDate; //수정날짜 |
| ... | @@ -45,7 +45,7 @@ var matches; //경기정보 | ... | @@ -45,7 +45,7 @@ var matches; //경기정보 |
| 45 | 45 | ||
| 46 | for(var i=0; i < champions_length; i++){ | 46 | for(var i=0; i < champions_length; i++){ |
| 47 | champ_point[i] = (info_champ_json[i]["championPoints"]); | 47 | champ_point[i] = (info_champ_json[i]["championPoints"]); |
| 48 | - champ_id[i] = info_champ_json[i]["championid"]; | 48 | + champ_id[i] = info_champ_json[i]["championId"]; |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | var staticUrl = "http://ddragon.leagueoflegends.com/cdn/6.24.1/data/en_US/champion.json"; | 51 | var staticUrl = "http://ddragon.leagueoflegends.com/cdn/6.24.1/data/en_US/champion.json"; |
| ... | @@ -55,9 +55,8 @@ var matches; //경기정보 | ... | @@ -55,9 +55,8 @@ var matches; //경기정보 |
| 55 | for(var i=0; i < champ_id.length; i++){ | 55 | for(var i=0; i < champ_id.length; i++){ |
| 56 | for(js in champion){ | 56 | for(js in champion){ |
| 57 | for(j in champion[js]){ | 57 | for(j in champion[js]){ |
| 58 | - if(champion[js]["id"] == champ_id[i]){ | 58 | + if(champion[js]["key"] == champ_id[i]){ |
| 59 | - champ_name[i] = champion[js]["key"]; | 59 | + champ_name[i] = champion[js]["id"]; |
| 60 | - console.log(champ_name[i]); | ||
| 61 | champ_pic[i] = "http://ddragon.leagueoflegends.com/cdn/6.24.1/img/champion/"+champ_name[i]+".png"; | 60 | champ_pic[i] = "http://ddragon.leagueoflegends.com/cdn/6.24.1/img/champion/"+champ_name[i]+".png"; |
| 62 | } | 61 | } |
| 63 | } | 62 | } | ... | ... |
-
Please register or login to post a comment