Toggle navigation
Toggle navigation
This project
Loading...
Sign in
박찬수
/
enjoy_soccer
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
박찬수
2022-06-09 05:30:23 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
093a58a223dec250d0db9e7b5433ed2073eb652e
093a58a2
1 parent
a632fd29
all commit
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
13 deletions
appfunctions.js
getid.js
printjsonparsing.js
reply.js
appfunctions.js
View file @
093a58a
var
data
=
require
(
'./getid.js'
);
// 입력: 팀ID, 리그ID, 시즌 입력, 반환: 경기일정
function
GetGameSchedule
(
teamID
,
leagueID
,
season
,
eventObj
){
var
request
=
require
(
"request"
);
...
...
@@ -130,5 +132,4 @@ function GetTeamStanding(teamID, season){
if
(
error
)
throw
new
Error
(
error
);
console
.
log
(
body
);
});
}
}
\ No newline at end of file
...
...
getid.js
View file @
093a58a
...
...
@@ -129,14 +129,4 @@ exports.SearchLeague = function(){
exports
.
SearchTeam
=
function
(
teamName
){
return
GetTeamIDByName
(
teamName
);
}
function
SayHello
(
basic
,
trans
){
console
.
log
(
basic
+
trans
);
}
function
BasicHello
(
basic
,
trans
){
papago
.
TranslateKRtoEN
(
basic
,
function
(
transedMsg
){
SayHello
(
basic
,
transedMsg
);
});
}
\ No newline at end of file
...
...
printjsonparsing.js
View file @
093a58a
This diff is collapsed. Click to expand it.
reply.js
View file @
093a58a
...
...
@@ -15,6 +15,9 @@ var data = require('./getid.js');
const
bodyParser
=
require
(
'body-parser'
);
var
currentLeagueID
=
0
;
var
currentTeamID
=
0
;
data
.
SetData
();
var
app
=
express
();
...
...
@@ -100,10 +103,13 @@ function GetPlayerInfo(playerID, season, eventObj){
function
SelectAPI
(
eventObj
,
commingMsg
){
if
(
tryParse
.
int
(
commingMsg
)
!=
null
){
// 리그 선택
SelectLeague
(
tryParse
.
int
(
commingMsg
));
Reply
(
eventObj
,
SelectLeagueInfo
);
}
else
{
// 팀명 입력
papago
.
TranslateKRtoEN
(
commingMsg
,
function
(
transedMsg
){
Reply
(
eventObj
,
transedMsg
);
//Reply(eventObj, transedMsg);
currentTeamID
=
data
.
SearchTeam
(
transedMsg
);
Reply
(
eventObj
,
SelectTeamInfo
());
});
}
;
...
...
@@ -145,6 +151,17 @@ function SelectLeague(inputNum){
default
:
break
;
}
currentLeagueID
=
leagueID
;
console
.
log
(
"Returned League ID : %d"
,
leagueID
);
return
leagueID
;
}
function
SelectLeagueInfo
(){
let
msg
=
'1. 팀 순위 \n 2. 득점 순위 \n 3. 도움 순위'
;
return
msg
;
}
function
SelectTeamInfo
(){
let
msg
=
'1. 경기 일정 \n 2. 소속 선수 \n 3. 순위'
;
return
msg
;
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment