Ga Min Cha

Update input teamname

...@@ -69,3 +69,57 @@ function GetTopAssist(season){ ...@@ -69,3 +69,57 @@ function GetTopAssist(season){
69 console.log(body); 69 console.log(body);
70 }); 70 });
71 } 71 }
72 +
73 +// 입력: 팀ID, 반환: 경기 일정
74 +function GetGameSchedule_teamname(teamID){
75 + var request = require("request");
76 + var options = {
77 + method: 'GET',
78 + url: 'https://v3.football.api-sports.io/fixtures',
79 + qs: {team: teamID},
80 + headers: {
81 + 'x-rapidapi-host': 'v3.football.api-sports.io',
82 + 'x-rapidapi-key': '526fc70a2e8b315e9a960ac4b4764191'
83 + }
84 + };
85 + request(options, function (error, response, body) {
86 + if (error) throw new Error(error);
87 + console.log(body);
88 + });
89 +}
90 +
91 +// 입력: 팀ID, 반환: 소속 선수
92 +function GetTeamMembers(teamID){
93 + var request = require("request");
94 + var options = {
95 + method: 'GET',
96 + url: 'https://v3.football.api-sports.io/players',
97 + qs: {team: teamID},
98 + headers: {
99 + 'x-rapidapi-host': 'v3.football.api-sports.io',
100 + 'x-rapidapi-key': '526fc70a2e8b315e9a960ac4b4764191'
101 + }
102 + };
103 + request(options, function (error, response, body) {
104 + if (error) throw new Error(error);
105 + console.log(body);
106 + })
107 +}
108 +
109 +// 입력: 팀ID, 시즌*(필수), 반환: 팀 순위
110 +function GetTeamStanding(teamID, season){
111 + var request = require("request");
112 + var options = {
113 + method: 'GET',
114 + url: 'https://v3.football.api-sports.io/standings',
115 + qs: {team: teamID, season: season},
116 + headers: {
117 + 'x-rapidapi-host': 'v3.football.api-sports.io',
118 + 'x-rapidapi-key': '526fc70a2e8b315e9a960ac4b4764191'
119 + }
120 + };
121 + request(options, function (error, response, body) {
122 + if (error) throw new Error(error);
123 + console.log(body);
124 + });
125 +}
...\ No newline at end of file ...\ No newline at end of file
......