Showing
1 changed file
with
55 additions
and
0 deletions
1 | +// 입력: 팀ID, 리그ID, 시즌 입력, 반환: 경기일정 | ||
1 | function GetGameSchedule(teamID, leagueID, season, eventObj){ | 2 | function GetGameSchedule(teamID, leagueID, season, eventObj){ |
2 | var request = require("request"); | 3 | var request = require("request"); |
3 | var options = { | 4 | var options = { |
... | @@ -14,3 +15,57 @@ function GetGameSchedule(teamID, leagueID, season, eventObj){ | ... | @@ -14,3 +15,57 @@ function GetGameSchedule(teamID, leagueID, season, eventObj){ |
14 | console.log(body); | 15 | console.log(body); |
15 | }); | 16 | }); |
16 | } | 17 | } |
18 | + | ||
19 | +// 입력: 리그ID, 반환: 팀 순위 | ||
20 | +function GetTeamStanding(season){ | ||
21 | + var request = require("request"); | ||
22 | + var options = { | ||
23 | + method: 'GET', | ||
24 | + url: 'https://v3.football.api-sports.io/standings', | ||
25 | + qs: {season: season}, | ||
26 | + headers: { | ||
27 | + 'x-rapidapi-host': 'v3.football.api-sports.io', | ||
28 | + 'x-rapidapi-key': '526fc70a2e8b315e9a960ac4b4764191' | ||
29 | + } | ||
30 | + }; | ||
31 | + request(options, function (error, response, body) { | ||
32 | + if (error) throw new Error(error); | ||
33 | + console.log(body); | ||
34 | + }); | ||
35 | +} | ||
36 | + | ||
37 | +// 입력: 리그ID, 반환: (선수) 득점 순위 | ||
38 | +function GetTopScorer(season){ | ||
39 | + var request = require("request"); | ||
40 | + var options = { | ||
41 | + method: 'GET', | ||
42 | + url: 'https://v3.football.api-sports.io/players/topscorers', | ||
43 | + qs: {season: season}, | ||
44 | + headers: { | ||
45 | + 'x-rapidapi-host': 'v3.football.api-sports.io', | ||
46 | + 'x-rapidapi-key': '526fc70a2e8b315e9a960ac4b4764191' | ||
47 | + } | ||
48 | + }; | ||
49 | + request(options, function (error, response, body) { | ||
50 | + if (error) throw new Error(error); | ||
51 | + console.log(body); | ||
52 | + }); | ||
53 | +} | ||
54 | + | ||
55 | +// 입력: 리그ID, 반환: 도움 순위 | ||
56 | +function GetTopAssist(season){ | ||
57 | + var request = require("request"); | ||
58 | + var options = { | ||
59 | + method: 'GET', | ||
60 | + url: 'https://v3.football.api-sports.io/players/topassists', | ||
61 | + qs: {season: season}, | ||
62 | + headers: { | ||
63 | + 'x-rapidapi-host': 'v3.football.api-sports.io', | ||
64 | + 'x-rapidapi-key': '526fc70a2e8b315e9a960ac4b4764191' | ||
65 | + } | ||
66 | + }; | ||
67 | + request(options, function (error, response, body) { | ||
68 | + if (error) throw new Error(error); | ||
69 | + console.log(body); | ||
70 | + }); | ||
71 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment