Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2019-1-OpenSourceSW
/
StarCraft2 Build Recommendation
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-20 18:23:47 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
343b66a9cb0f508a18e6c1e7ce90c96645f6b1ff
343b66a9
1 parent
e456a576
12월20일 api access token 무작위 교체 반영하여 각 request url 수정
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
README.txt
router/main.js
README.txt
View file @
343b66a
...
...
@@ -48,4 +48,8 @@ Branch를 master + 3가지(API, Build_Data, Site)로 나눠서 작업
3. 잘 동작하는 테스트용 ID : Stats(김대엽 선수), Rogue(이병렬 선수), rogue(일반인)
4. 한글아이디 검색은 구현하지 않아서 불가능하다.
\ No newline at end of file
4. 한글아이디 검색은 구현하지 않아서 불가능하다.
<2018.12.20 추가>
블리자드 API access token의 주기적인 랜덤교체로 router/main.js에서 각 request url 수정함.
이후 access token의 교체가 또 발생하면 관리자의 access token을 발급받아야함.
...
...
router/main.js
View file @
343b66a
...
...
@@ -122,7 +122,7 @@ console.log("query"+enemyname);
//console.log(`${profileID}`);//테스트용 : profileID 출력
var
match_history_1
=
"https://kr.api.blizzard.com/sc2/legacy/profile/3/1/"
//매치히스토리 url 앞부분
var
match_history_2
=
"/matches?access_token=US
115TlhyMaYe3d3v4t6j17Umw1CfsvCIV
"
//매치히스토리 url 뒷부분
var
match_history_2
=
"/matches?access_token=US
CbkLNyTur6a4bb27UdHIfTeH6wlA68HY
"
//매치히스토리 url 뒷부분
var
match_history_url
=
match_history_1
+
profileID
+
match_history_2
;
//매치히스토리 url 구성
console
.
log
(
match_history_url
);
//테스트용 : 매치히스토리 url 출력
...
...
@@ -139,7 +139,7 @@ console.log("query"+enemyname);
});
//each function 종료
var
ladder_1
=
"https://kr.api.blizzard.com/sc2/legacy/profile/3/1/"
var
ladder_2
=
"/ladders?access_token=US
115TlhyMaYe3d3v4t6j17Umw1CfsvCIV
"
;
var
ladder_2
=
"/ladders?access_token=US
CbkLNyTur6a4bb27UdHIfTeH6wlA68HY
"
;
var
ladder_url
=
ladder_1
+
profileID
+
ladder_2
;
console
.
log
(
ladder_url
);
request
(
ladder_url
,(
error
,
response
,
body
)
=>
{
//ladder request request 4
...
...
@@ -156,7 +156,7 @@ console.log("query"+enemyname);
//console.log(win_rate);
var
profile_1
=
"https://kr.api.blizzard.com/sc2/legacy/profile/3/1/"
;
var
profile_2
=
"?access_token=US
115TlhyMaYe3d3v4t6j17Umw1CfsvCIV
"
;
var
profile_2
=
"?access_token=US
CbkLNyTur6a4bb27UdHIfTeH6wlA68HY
"
;
var
profile_url
=
profile_1
+
profileID
+
profile_2
;
console
.
log
(
profile_url
);
request
(
profile_url
,(
error
,
response
,
body
)
=>
{
//profile request request 5
...
...
Please
register
or
login
to post a comment