Ga Min Cha

Jsonparsing Added

......@@ -16,7 +16,7 @@ function GetGameSchedule(teamID, leagueID, season, eventObj){
});
}
// 입력: 리그ID, 반환: 팀 순위
// 입력: 리그ID, 시즌(*필수) 반환: 팀 순위
function GetLeagueStanding(leagueID, season){
var request = require("request");
var options = {
......@@ -42,13 +42,13 @@ function GetLeagueStanding(leagueID, season){
});
}
// 입력: 리그ID, 반환: (선수) 득점 순위
function GetTopScorer(season){
// 입력: 리그ID(*필수), 시즌(*필수), 반환: (선수) 득점 순위
function GetTopScorer(leagueID, season){
var request = require("request");
var options = {
method: 'GET',
url: 'https://v3.football.api-sports.io/players/topscorers',
qs: {season: season},
qs: {league : leagueID, season: season},
headers: {
'x-rapidapi-host': 'v3.football.api-sports.io',
'x-rapidapi-key': '526fc70a2e8b315e9a960ac4b4764191'
......@@ -60,13 +60,13 @@ function GetTopScorer(season){
});
}
// 입력: 리그ID, 반환: 도움 순위
function GetTopAssist(season){
// 입력: 리그ID(*필수), 시즌(*필수), 반환: 도움 순위
function GetTopAssist(leagueID, season){
var request = require("request");
var options = {
method: 'GET',
url: 'https://v3.football.api-sports.io/players/topassists',
qs: {season: season},
qs: {league : leagueID, season: season},
headers: {
'x-rapidapi-host': 'v3.football.api-sports.io',
'x-rapidapi-key': '526fc70a2e8b315e9a960ac4b4764191'
......@@ -132,4 +132,3 @@ function GetTeamStanding(teamID, season){
});
}
GetLeagueStanding(39, 2021);
......
This diff is collapsed. Click to expand it.
......@@ -33,10 +33,10 @@ function transMsg(replyMsg){
console.log(transMessage);
}
});
}
}
var replyMsg = "선수, 시즌, 순위, 리그, 손흥민, 네이마르, 1등"
function transMsg_toEn(replyMsg){
var language = "en";
......@@ -56,4 +56,4 @@ function transMsg_toEn(replyMsg){
console.log(transMessage);
}
});
}
\ No newline at end of file
}
\ No newline at end of file
......