Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2019-1-OpenSourceSW
/
RUTROLL
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박민근
2018-12-02 18:19:01 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
531dc8c8cabefc117b2938486437d8fc1977ed7f
531dc8c8
1 parent
37761657
Seccessfully Excuted
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
router/Test.js
router/Test.js
View file @
531dc8c
...
...
@@ -2,7 +2,7 @@ module.exports = function(app){
var
request
=
require
(
"request"
);
var
urlenconde
=
require
(
'urlencode'
);
var
apikey
=
"RGAPI-
4f69669a-be29-4806-a82b-ffe2db68630d
"
//api
var
apikey
=
"RGAPI-
83bf5bd8-d355-48f2-8531-d33c1befa920
"
//api
var
profileIconId
;
//아이콘 번호
var
revisionDate
;
//수정날짜
...
...
@@ -37,16 +37,15 @@ var matches; //경기정보
var
champUrl
=
"https://kr.api.riotgames.com/lol/champion-mastery/v3/champion-masteries/by-summoner/"
+
urlenconde
(
id
)
+
"?api_key="
+
apikey
;
request
(
champUrl
,
function
(
error
,
response
,
body
){
var
info_champ_json
=
JSON
.
parse
(
body
);
var
champions
=
info_champ_json
[
"champions"
];
var
champ_point
=
new
Array
();
var
champ_id
=
new
Array
();
var
champ_name
=
new
Array
();
var
champ_pic
=
new
Array
();
var
champions_length
=
Object
.
keys
(
champions
).
length
;
var
champions_length
=
Object
.
keys
(
info_champ_json
).
length
;
for
(
var
i
=
0
;
i
<
champions_length
;
i
++
){
champ_point
[
i
]
=
(
champions
[
i
][
"championPoints"
]);
champ_id
[
i
]
=
champions
[
i
][
"championid"
];
champ_point
[
i
]
=
(
info_champ_json
[
i
][
"championPoints"
]);
champ_id
[
i
]
=
info_champ_json
[
i
][
"championid"
];
}
var
staticUrl
=
"http://ddragon.leagueoflegends.com/cdn/6.24.1/data/en_US/champion.json"
;
...
...
@@ -58,7 +57,8 @@ var matches; //경기정보
for
(
j
in
champion
[
js
]){
if
(
champion
[
js
][
"id"
]
==
champ_id
[
i
]){
champ_name
[
i
]
=
champion
[
js
][
"key"
];
champ_pic
[
i
]
=
"http://ddragon.leagueoflegends.com/cdn/6.24.1/img/champion/"
+
champ_name
[
i
]
+
".png"
";
console
.
log
(
champ_name
[
i
]);
champ_pic
[
i
]
=
"http://ddragon.leagueoflegends.com/cdn/6.24.1/img/champion/"
+
champ_name
[
i
]
+
".png"
;
}
}
}
...
...
Please
register
or
login
to post a comment