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-21 17:07:16 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a0924ce7cfd09b269e248b9480fa55e30aaab9f4
a0924ce7
1 parent
b79cb24b
실시간 경기 데이터 매핑
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
lolinfo/router/mytest.js
lolinfo/router/mytest.js
View file @
a0924ce
...
...
@@ -221,12 +221,12 @@ module.exports = function(app){
var
spectatorUrl
=
"https://kr.api.riotgames.com/lol/spectator/v4/active-games/by-summoner/"
+
urlenconde
(
id
)
+
"?api_key="
+
apikey
;
request
(
spectatorUrl
,
function
(
error
,
response
,
body
)
{
var
flag
=
true
;
var
flag
=
true
;
// 실시간 경기 여부
if
(
response
.
statusCode
!=
200
)
flag
=
false
;
if
(
flag
)
{
if
(
flag
)
{
// 실시간 경기 진행중이면
var
spectator_json
=
JSON
.
parse
(
body
);
console
.
log
(
spectator_json
);
var
spec_bannedChamp
=
spectator_json
.
bannedChampions
;
...
...
@@ -266,6 +266,13 @@ module.exports = function(app){
}
}
}
var
spectator
=
{
"summonerName"
:
spec_summonerName
,
"selectedChamp_image"
:
spec_selectedChamp_image
,
"bannedChamp_image"
:
spec_bannedChamp_image
,
"spell_image"
:
spec_spell_image
};
}
var
matchUrl
=
"https://kr.api.riotgames.com/lol/match/v4/matchlists/by-account/"
+
accountId
+
"?api_key="
+
apikey
;
...
...
Please
register
or
login
to post a comment