Toggle navigation
Toggle navigation
This project
Loading...
Sign in
황성연
/
lolinfo.gg
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
황성연
2020-06-20 17:34:08 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d778c6e0f893efef59422636e0bb607ab2120511
d778c6e0
1 parent
86a2149d
MATCH-V4 api 추가
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
lolinfo/router/mytest.js
lolinfo/router/mytest.js
View file @
d778c6e
...
...
@@ -128,9 +128,6 @@ module.exports = function(app){
}
}
}
console
.
log
(
rotation_name
);
console
.
log
(
"챔프길이:"
+
champ_count
);
var
userLeagueUrl
=
"https://kr.api.riotgames.com/lol/league/v4/entries/by-summoner/"
+
urlenconde
(
id
)
+
"?api_key="
+
apikey
;
request
(
userLeagueUrl
,
function
(
error
,
response
,
body
){
...
...
@@ -240,8 +237,6 @@ module.exports = function(app){
var
spec_selectedChamp_image
=
new
Array
();
for
(
var
i
=
0
;
i
<
10
;
i
++
)
{
if
((
spec_bannedChamp
[
i
]).
championId
==
-
1
)
continue
;
for
(
var
key
in
champion
)
{
if
(
champion
.
hasOwnProperty
(
key
)
&&
champion
[
key
].
key
==
spec_bannedChamp
[
i
].
championId
)
{
...
...
@@ -252,13 +247,26 @@ module.exports = function(app){
}
}
}
console
.
log
(
spec_bannedChamp_image
);
console
.
log
(
spec_selectedChamp_image
);
}
var
matchUrl
=
"https://kr.api.riotgames.com/lol/match/v4/matchlists/by-account/"
+
accountId
+
"?api_key="
+
apikey
;
request
(
matchUrl
,
function
(
error
,
response
,
body
)
{
var
match_json
=
JSON
.
parse
(
body
).
matches
;
console
.
log
(
match_json
);
var
match_gameId
=
new
Array
();
var
match_mychamp
=
new
Array
();
for
(
var
i
=
0
;
i
<
10
;
i
++
){
match_gameId
.
push
(
match_json
[
i
].
gameId
);
match_mychamp
.
push
(
match_json
[
i
].
champion
);
}
console
.
log
(
match_gameId
);
console
.
log
(
match_mychamp
);
...
...
@@ -281,6 +289,7 @@ module.exports = function(app){
c_rank
:
rank
,
c_leaguePoint
:
leaguePoints
});
});
});
});
});
...
...
Please
register
or
login
to post a comment