Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이정호
/
lolhelper
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-21 17:48:26 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
77ba9f5312146fdfba58c71eaf43be24c0d025c0
77ba9f53
1 parent
2b909124
multikill edited
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
13 deletions
LOL_Helper/router/Test.js
LOL_Helper/router/main.js
LOL_Helper/views/index.ejs
LOL_Helper/router/Test.js
View file @
77ba9f5
function
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
num
)
{
function
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
largestMultiKill
,
num
)
{
for
(
var
i
=
0
;
i
<
10
;
i
++
)
{
if
(
info_match
[
"participants"
][
i
][
"championId"
]
==
championId
[
num
])
{
win
[
num
]
=
info_match
[
"participants"
][
i
][
"stats"
][
"win"
];
kills
[
num
]
=
info_match
[
"participants"
][
i
][
"stats"
][
"kills"
];
deaths
[
num
]
=
info_match
[
"participants"
][
i
][
"stats"
][
"deaths"
];
assists
[
num
]
=
info_match
[
"participants"
][
i
][
"stats"
][
"assists"
];
largestMultiKill
[
num
]
=
info_match
[
"participants"
][
i
][
"stats"
][
"largestMultiKill"
]
}
}
}
...
...
@@ -13,7 +14,7 @@ module.exports = function(app) {
var
request
=
require
(
"request"
);
var
urlenconde
=
require
(
'urlencode'
);
var
apikey
=
"RGAPI-
99907b0b-aeeb-4ea0-9450-c4758fb672c1
"
;
//api
var
apikey
=
"RGAPI-
720b5005-7e3d-4f52-909f-6c35d45ed856
"
;
//api
var
profileIconId
;
//아이콘 번호
var
revisionDate
;
//수정날짜
...
...
@@ -168,47 +169,48 @@ module.exports = function(app) {
var
kills
=
new
Array
();
var
deaths
=
new
Array
();
var
assists
=
new
Array
();
var
largestMultiKill
=
new
Array
();
var
matchUrl
;
matchUrl
=
"https://kr.api.riotgames.com/lol/match/v4/matches/"
+
urlenconde
(
gameId
[
0
])
+
"?api_key="
+
apikey
;
request
(
matchUrl
,
function
(
error
,
response
,
body
){
var
info_match
=
JSON
.
parse
(
body
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
0
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
largestMultiKill
,
0
);
matchUrl
=
"https://kr.api.riotgames.com/lol/match/v4/matches/"
+
urlenconde
(
gameId
[
1
])
+
"?api_key="
+
apikey
;
request
(
matchUrl
,
function
(
error
,
response
,
body
){
var
info_match
=
JSON
.
parse
(
body
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
1
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
largestMultiKill
,
1
);
matchUrl
=
"https://kr.api.riotgames.com/lol/match/v4/matches/"
+
urlenconde
(
gameId
[
2
])
+
"?api_key="
+
apikey
;
request
(
matchUrl
,
function
(
error
,
response
,
body
){
var
info_match
=
JSON
.
parse
(
body
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
2
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
largestMultiKill
,
2
);
matchUrl
=
"https://kr.api.riotgames.com/lol/match/v4/matches/"
+
urlenconde
(
gameId
[
3
])
+
"?api_key="
+
apikey
;
request
(
matchUrl
,
function
(
error
,
response
,
body
){
var
info_match
=
JSON
.
parse
(
body
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
3
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
largestMultiKill
,
3
);
matchUrl
=
"https://kr.api.riotgames.com/lol/match/v4/matches/"
+
urlenconde
(
gameId
[
4
])
+
"?api_key="
+
apikey
;
request
(
matchUrl
,
function
(
error
,
response
,
body
){
var
info_match
=
JSON
.
parse
(
body
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
4
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
largestMultiKill
,
4
);
matchUrl
=
"https://kr.api.riotgames.com/lol/match/v4/matches/"
+
urlenconde
(
gameId
[
5
])
+
"?api_key="
+
apikey
;
request
(
matchUrl
,
function
(
error
,
response
,
body
){
var
info_match
=
JSON
.
parse
(
body
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
5
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
largestMultiKill
,
5
);
matchUrl
=
"https://kr.api.riotgames.com/lol/match/v4/matches/"
+
urlenconde
(
gameId
[
6
])
+
"?api_key="
+
apikey
;
request
(
matchUrl
,
function
(
error
,
response
,
body
){
var
info_match
=
JSON
.
parse
(
body
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
6
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
largestMultiKill
,
6
);
matchUrl
=
"https://kr.api.riotgames.com/lol/match/v4/matches/"
+
urlenconde
(
gameId
[
7
])
+
"?api_key="
+
apikey
;
request
(
matchUrl
,
function
(
error
,
response
,
body
){
var
info_match
=
JSON
.
parse
(
body
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
7
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
largestMultiKill
,
7
);
matchUrl
=
"https://kr.api.riotgames.com/lol/match/v4/matches/"
+
urlenconde
(
gameId
[
8
])
+
"?api_key="
+
apikey
;
request
(
matchUrl
,
function
(
error
,
response
,
body
){
var
info_match
=
JSON
.
parse
(
body
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
8
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
largestMultiKill
,
8
);
matchUrl
=
"https://kr.api.riotgames.com/lol/match/v4/matches/"
+
urlenconde
(
gameId
[
9
])
+
"?api_key="
+
apikey
;
request
(
matchUrl
,
function
(
error
,
response
,
body
){
var
info_match
=
JSON
.
parse
(
body
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
9
);
func
(
info_match
,
championId
,
win
,
kills
,
deaths
,
assists
,
largestMultiKill
,
9
);
champ_name
[
champ_name
.
length
]
=
"total"
;
var
temp_id
;
var
temp_name
;
...
...
@@ -279,6 +281,7 @@ module.exports = function(app) {
c_kills
:
kills
,
c_deaths
:
deaths
,
c_assists
:
assists
,
c_largestMultiKill
:
largestMultiKill
,
c_pic
:
picture
});
});
...
...
LOL_Helper/router/main.js
View file @
77ba9f5
...
...
@@ -2,7 +2,7 @@ module.exports = function(app){
var
request
=
require
(
"request"
);
var
urlenconde
=
require
(
'urlencode'
);
var
apikey
=
"RGAPI-
99907b0b-aeeb-4ea0-9450-c4758fb672c1
"
//api
var
apikey
=
"RGAPI-
720b5005-7e3d-4f52-909f-6c35d45ed856
"
//api
var
profileIconId
;
//아이콘 번호
var
revisionDate
;
//수정날짜
...
...
LOL_Helper/views/index.ejs
View file @
77ba9f5
...
...
@@ -85,6 +85,21 @@
<
% if (c_deaths[i] != 0) { %>
<
%= ((c_kills[i] + c_assists[i]) / c_deaths[i]).toFixed(2) %>
<
% } %>
<span
style =
"color : red"
>
<
% if (c_largestMultiKill[i] == 2) { %>
<
%= "\t더블킬" %>
<
% } %>
<
% if (c_largestMultiKill[i] == 3) { %>
<
%= "\t트리플킬" %>
<
% } %>
<
% if (c_largestMultiKill[i] == 4) { %>
<
%= "\t쿼드라킬" %>
<
% } %>
<
% if (c_largestMultiKill[i] == 5) { %>
<
%= "\t펜타킬" %>
<
% } %>
</span>
<br></br>
<
% } %>
</b>
...
...
Please
register
or
login
to post a comment