박찬수

all commit

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
......
......@@ -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
......
// 도움순위
let topAssistJson = {"get":"players\/topassists","parameters":{"league":"39","season":"2021"},"errors":[],"results":20,"paging":{"current":0,"total":1},"response":[{"player":{"id":306,"name":"Mohamed Salah Ghaly","firstname":"Mohamed","lastname":"Salah Ghaly","age":30,"birth":{"date":"1992-06-15","place":"Mu\u1e25\u0101fa\u1e93at al Gharbiyya","country":"Egypt"},"nationality":"Egypt","height":"175 cm","weight":"71 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/306.png"},"statistics":[{"team":{"id":40,"name":"Liverpool","logo":"https:\/\/media.api-sports.io\/football\/teams\/40.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":35,"lineups":30,"minutes":2762,"number":null,"position":"Attacker","rating":"7.391428","captain":false},"substitutes":{"in":5,"out":5,"bench":5},"shots":{"total":101,"on":60},"goals":{"total":23,"conceded":0,"assists":13,"saves":null},"passes":{"total":1079,"key":64,"accuracy":24},"tackles":{"total":17,"blocks":1,"interceptions":6},"duels":{"total":309,"won":100},"dribbles":{"attempts":124,"success":53,"past":null},"fouls":{"drawn":23,"committed":12},"cards":{"yellow":1,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":5,"missed":1,"saved":null}}]},{"player":{"id":283,"name":"T. Alexander-Arnold","firstname":"Trent","lastname":"Alexander-Arnold","age":24,"birth":{"date":"1998-10-07","place":"Liverpool","country":"England"},"nationality":"England","height":"175 cm","weight":"69 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/283.png"},"statistics":[{"team":{"id":40,"name":"Liverpool","logo":"https:\/\/media.api-sports.io\/football\/teams\/40.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":32,"lineups":32,"minutes":2854,"number":null,"position":"Defender","rating":"7.662500","captain":false},"substitutes":{"in":0,"out":2,"bench":2},"shots":{"total":36,"on":15},"goals":{"total":2,"conceded":0,"assists":12,"saves":null},"passes":{"total":2155,"key":90,"accuracy":52},"tackles":{"total":40,"blocks":4,"interceptions":43},"duels":{"total":178,"won":81},"dribbles":{"attempts":39,"success":19,"past":null},"fouls":{"drawn":7,"committed":12},"cards":{"yellow":2,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":19428,"name":"J. Bowen","firstname":"Jarrod","lastname":"Bowen","age":26,"birth":{"date":"1996-12-20","place":"Leominster","country":"England"},"nationality":"England","height":null,"weight":null,"injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/19428.png"},"statistics":[{"team":{"id":48,"name":"West Ham","logo":"https:\/\/media.api-sports.io\/football\/teams\/48.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":36,"lineups":34,"minutes":2993,"number":null,"position":"Attacker","rating":"7.033333","captain":false},"substitutes":{"in":2,"out":12,"bench":2},"shots":{"total":56,"on":34},"goals":{"total":12,"conceded":0,"assists":10,"saves":null},"passes":{"total":714,"key":42,"accuracy":15},"tackles":{"total":36,"blocks":2,"interceptions":21},"duels":{"total":370,"won":167},"dribbles":{"attempts":88,"success":50,"past":null},"fouls":{"drawn":43,"committed":25},"cards":{"yellow":6,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":19220,"name":"M. Mount","firstname":"Mason","lastname":"Mount","age":23,"birth":{"date":"1999-01-10","place":"Portsmouth","country":"England"},"nationality":"England","height":"178 cm","weight":"70 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/19220.png"},"statistics":[{"team":{"id":49,"name":"Chelsea","logo":"https:\/\/media.api-sports.io\/football\/teams\/49.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":32,"lineups":27,"minutes":2365,"number":null,"position":"Midfielder","rating":"7.443750","captain":false},"substitutes":{"in":5,"out":7,"bench":8},"shots":{"total":55,"on":29},"goals":{"total":11,"conceded":0,"assists":10,"saves":null},"passes":{"total":1115,"key":58,"accuracy":29},"tackles":{"total":41,"blocks":1,"interceptions":13},"duels":{"total":230,"won":88},"dribbles":{"attempts":42,"success":18,"past":null},"fouls":{"drawn":23,"committed":30},"cards":{"yellow":4,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":1,"missed":0,"saved":null}}]},{"player":{"id":18778,"name":"H. Barnes","firstname":"Harvey Lewis","lastname":"Barnes","age":25,"birth":{"date":"1997-12-09","place":"Burnley","country":"England"},"nationality":"England","height":"174 cm","weight":"66 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/18778.png"},"statistics":[{"team":{"id":46,"name":"Leicester","logo":"https:\/\/media.api-sports.io\/football\/teams\/46.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":32,"lineups":24,"minutes":2104,"number":null,"position":"Midfielder","rating":"6.775000","captain":false},"substitutes":{"in":8,"out":11,"bench":11},"shots":{"total":45,"on":24},"goals":{"total":6,"conceded":0,"assists":10,"saves":null},"passes":{"total":704,"key":29,"accuracy":16},"tackles":{"total":31,"blocks":1,"interceptions":5},"duels":{"total":269,"won":106},"dribbles":{"attempts":75,"success":31,"past":null},"fouls":{"drawn":20,"committed":19},"cards":{"yellow":2,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":289,"name":"A. Robertson","firstname":"Andrew","lastname":"Robertson","age":28,"birth":{"date":"1994-03-11","place":"Glasgow","country":"Scotland"},"nationality":"Scotland","height":"178 cm","weight":"64 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/289.png"},"statistics":[{"team":{"id":40,"name":"Liverpool","logo":"https:\/\/media.api-sports.io\/football\/teams\/40.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":29,"lineups":29,"minutes":2541,"number":null,"position":"Defender","rating":"7.400000","captain":false},"substitutes":{"in":0,"out":3,"bench":4},"shots":{"total":14,"on":8},"goals":{"total":3,"conceded":0,"assists":10,"saves":null},"passes":{"total":1928,"key":56,"accuracy":56},"tackles":{"total":36,"blocks":3,"interceptions":23},"duels":{"total":157,"won":84},"dribbles":{"attempts":23,"success":13,"past":null},"fouls":{"drawn":9,"committed":19},"cards":{"yellow":5,"yellowred":0,"red":1},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":184,"name":"Harry Kane","firstname":"Harry","lastname":"Kane","age":29,"birth":{"date":"1993-07-28","place":"London","country":"England"},"nationality":"England","height":"188 cm","weight":"86 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/184.png"},"statistics":[{"team":{"id":47,"name":"Tottenham","logo":"https:\/\/media.api-sports.io\/football\/teams\/47.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":37,"lineups":36,"minutes":3232,"number":null,"position":"Attacker","rating":"7.378378","captain":false},"substitutes":{"in":1,"out":1,"bench":1},"shots":{"total":97,"on":55},"goals":{"total":17,"conceded":0,"assists":9,"saves":null},"passes":{"total":874,"key":53,"accuracy":16},"tackles":{"total":15,"blocks":8,"interceptions":3},"duels":{"total":437,"won":198},"dribbles":{"attempts":100,"success":54,"past":null},"fouls":{"drawn":54,"committed":42},"cards":{"yellow":5,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":4,"missed":0,"saved":null}}]},{"player":{"id":19545,"name":"R. James","firstname":"Reece","lastname":"James","age":23,"birth":{"date":"1999-12-08","place":"London","country":"England"},"nationality":"England","height":"183 cm","weight":"82 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/19545.png"},"statistics":[{"team":{"id":49,"name":"Chelsea","logo":"https:\/\/media.api-sports.io\/football\/teams\/49.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":26,"lineups":22,"minutes":1865,"number":null,"position":"Defender","rating":"7.388000","captain":false},"substitutes":{"in":4,"out":4,"bench":5},"shots":{"total":24,"on":10},"goals":{"total":5,"conceded":0,"assists":9,"saves":null},"passes":{"total":1379,"key":49,"accuracy":47},"tackles":{"total":33,"blocks":2,"interceptions":17},"duels":{"total":202,"won":117},"dribbles":{"attempts":47,"success":36,"past":null},"fouls":{"drawn":31,"committed":20},"cards":{"yellow":4,"yellowred":0,"red":1},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":904,"name":"P. Pogba","firstname":"Paul","lastname":"Pogba","age":29,"birth":{"date":"1993-03-15","place":"Lagny-sur-Marne","country":"France"},"nationality":"France","height":"191 cm","weight":"84 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/904.png"},"statistics":[{"team":{"id":33,"name":"Manchester United","logo":"https:\/\/media.api-sports.io\/football\/teams\/33.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":20,"lineups":16,"minutes":1353,"number":null,"position":"Midfielder","rating":"6.905000","captain":false},"substitutes":{"in":4,"out":7,"bench":4},"shots":{"total":23,"on":8},"goals":{"total":1,"conceded":0,"assists":9,"saves":null},"passes":{"total":877,"key":24,"accuracy":36},"tackles":{"total":13,"blocks":null,"interceptions":13},"duels":{"total":238,"won":116},"dribbles":{"attempts":54,"success":39,"past":null},"fouls":{"drawn":29,"committed":39},"cards":{"yellow":7,"yellowred":0,"red":1},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":629,"name":"K. De Bruyne","firstname":"Kevin","lastname":"De Bruyne","age":31,"birth":{"date":"1991-06-28","place":"Drongen","country":"Belgium"},"nationality":"Belgium","height":"181 cm","weight":"68 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/629.png"},"statistics":[{"team":{"id":50,"name":"Manchester City","logo":"https:\/\/media.api-sports.io\/football\/teams\/50.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":30,"lineups":25,"minutes":2205,"number":null,"position":"Midfielder","rating":"7.780000","captain":false},"substitutes":{"in":5,"out":9,"bench":8},"shots":{"total":56,"on":31},"goals":{"total":15,"conceded":0,"assists":8,"saves":null},"passes":{"total":1358,"key":87,"accuracy":37},"tackles":{"total":32,"blocks":2,"interceptions":6},"duels":{"total":209,"won":101},"dribbles":{"attempts":55,"success":31,"past":null},"fouls":{"drawn":27,"committed":21},"cards":{"yellow":2,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":18784,"name":"J. Maddison","firstname":"James","lastname":"Maddison","age":26,"birth":{"date":"1996-11-23","place":"Coventry","country":"England"},"nationality":"England","height":"175 cm","weight":"73 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/18784.png"},"statistics":[{"team":{"id":46,"name":"Leicester","logo":"https:\/\/media.api-sports.io\/football\/teams\/46.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":35,"lineups":28,"minutes":2466,"number":null,"position":"Midfielder","rating":"7.302857","captain":false},"substitutes":{"in":7,"out":14,"bench":7},"shots":{"total":54,"on":34},"goals":{"total":12,"conceded":0,"assists":8,"saves":null},"passes":{"total":955,"key":49,"accuracy":22},"tackles":{"total":40,"blocks":3,"interceptions":11},"duels":{"total":254,"won":140},"dribbles":{"attempts":48,"success":31,"past":null},"fouls":{"drawn":64,"committed":22},"cards":{"yellow":3,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":18819,"name":"Michail Gregory Antonio","firstname":"Michail Gregory","lastname":"Antonio","age":32,"birth":{"date":"1990-03-28","place":"London","country":"England"},"nationality":"Jamaica","height":"180 cm","weight":"82 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/18819.png"},"statistics":[{"team":{"id":48,"name":"West Ham","logo":"https:\/\/media.api-sports.io\/football\/teams\/48.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":36,"lineups":34,"minutes":2980,"number":null,"position":"Attacker","rating":"6.966666","captain":false},"substitutes":{"in":2,"out":10,"bench":3},"shots":{"total":59,"on":29},"goals":{"total":10,"conceded":0,"assists":8,"saves":null},"passes":{"total":615,"key":46,"accuracy":11},"tackles":{"total":23,"blocks":1,"interceptions":3},"duels":{"total":489,"won":204},"dribbles":{"attempts":93,"success":50,"past":null},"fouls":{"drawn":52,"committed":50},"cards":{"yellow":7,"yellowred":1,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":1,"saved":null}}]},{"player":{"id":643,"name":"Gabriel Jesus","firstname":"Gabriel Fernando","lastname":"de Jesus","age":25,"birth":{"date":"1997-04-03","place":"S\u00e3o Paulo","country":"Brazil"},"nationality":"Brazil","height":"175 cm","weight":"73 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/643.png"},"statistics":[{"team":{"id":50,"name":"Manchester City","logo":"https:\/\/media.api-sports.io\/football\/teams\/50.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":28,"lineups":21,"minutes":1878,"number":null,"position":"Attacker","rating":"7.144444","captain":false},"substitutes":{"in":7,"out":8,"bench":13},"shots":{"total":44,"on":25},"goals":{"total":8,"conceded":0,"assists":8,"saves":null},"passes":{"total":739,"key":38,"accuracy":22},"tackles":{"total":18,"blocks":null,"interceptions":15},"duels":{"total":242,"won":111},"dribbles":{"attempts":71,"success":46,"past":null},"fouls":{"drawn":26,"committed":26},"cards":{"yellow":1,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":1,"missed":0,"saved":null}}]},{"player":{"id":30435,"name":"D. Kulusevski","firstname":"Dejan","lastname":"Kulusevski","age":22,"birth":{"date":"2000-04-25","place":null,"country":"Sweden"},"nationality":"Sweden","height":"186 cm","weight":"80 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/30435.png"},"statistics":[{"team":{"id":47,"name":"Tottenham","logo":"https:\/\/media.api-sports.io\/football\/teams\/47.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":18,"lineups":14,"minutes":1267,"number":null,"position":"Midfielder","rating":"7.205555","captain":false},"substitutes":{"in":4,"out":10,"bench":4},"shots":{"total":15,"on":10},"goals":{"total":5,"conceded":0,"assists":8,"saves":null},"passes":{"total":456,"key":25,"accuracy":21},"tackles":{"total":19,"blocks":null,"interceptions":13},"duels":{"total":144,"won":62},"dribbles":{"attempts":44,"success":25,"past":null},"fouls":{"drawn":15,"committed":20},"cards":{"yellow":3,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":186,"name":"Son Heung-Min","firstname":"Heung-Min","lastname":"Son","age":30,"birth":{"date":"1992-07-08","place":"Chuncheon","country":"Korea Republic"},"nationality":"Korea Republic","height":"183 cm","weight":"78 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/186.png"},"statistics":[{"team":{"id":47,"name":"Tottenham","logo":"https:\/\/media.api-sports.io\/football\/teams\/47.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":35,"lineups":35,"minutes":3021,"number":null,"position":"Midfielder","rating":"7.505714","captain":false},"substitutes":{"in":0,"out":15,"bench":0},"shots":{"total":69,"on":49},"goals":{"total":23,"conceded":0,"assists":7,"saves":null},"passes":{"total":1015,"key":73,"accuracy":25},"tackles":{"total":15,"blocks":6,"interceptions":13},"duels":{"total":270,"won":118},"dribbles":{"attempts":92,"success":51,"past":null},"fouls":{"drawn":36,"committed":14},"cards":{"yellow":2,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":1460,"name":"B. Saka","firstname":"Bukayo","lastname":"Saka","age":21,"birth":{"date":"2001-09-05","place":"London","country":"England"},"nationality":"England","height":"178 cm","weight":"65 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/1460.png"},"statistics":[{"team":{"id":42,"name":"Arsenal","logo":"https:\/\/media.api-sports.io\/football\/teams\/42.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":38,"lineups":36,"minutes":2996,"number":null,"position":"Attacker","rating":"6.989473","captain":false},"substitutes":{"in":2,"out":20,"bench":2},"shots":{"total":58,"on":31},"goals":{"total":11,"conceded":0,"assists":7,"saves":null},"passes":{"total":1062,"key":69,"accuracy":22},"tackles":{"total":40,"blocks":2,"interceptions":22},"duels":{"total":371,"won":165},"dribbles":{"attempts":102,"success":43,"past":null},"fouls":{"drawn":59,"committed":39},"cards":{"yellow":6,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":2,"missed":0,"saved":null}}]},{"player":{"id":20589,"name":"B. Mbeumo","firstname":"Bryan","lastname":"Mbeumo","age":23,"birth":{"date":"1999-08-07","place":"Avallon","country":"France"},"nationality":"France","height":"173 cm","weight":null,"injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/20589.png"},"statistics":[{"team":{"id":55,"name":"Brentford","logo":"https:\/\/media.api-sports.io\/football\/teams\/55.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":35,"lineups":34,"minutes":2916,"number":null,"position":"Attacker","rating":"6.842857","captain":false},"substitutes":{"in":1,"out":12,"bench":2},"shots":{"total":59,"on":22},"goals":{"total":4,"conceded":0,"assists":7,"saves":null},"passes":{"total":730,"key":34,"accuracy":14},"tackles":{"total":28,"blocks":6,"interceptions":11},"duels":{"total":368,"won":134},"dribbles":{"attempts":80,"success":39,"past":null},"fouls":{"drawn":38,"committed":20},"cards":{"yellow":4,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":1,"missed":0,"saved":null}}]},{"player":{"id":1467,"name":"Alexandre Lacazette","firstname":"Alexandre","lastname":"Lacazette","age":31,"birth":{"date":"1991-05-28","place":"Lyon","country":"France"},"nationality":"France","height":"175 cm","weight":"73 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/1467.png"},"statistics":[{"team":{"id":42,"name":"Arsenal","logo":"https:\/\/media.api-sports.io\/football\/teams\/42.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":30,"lineups":20,"minutes":1787,"number":null,"position":"Attacker","rating":"6.964285","captain":false},"substitutes":{"in":10,"out":14,"bench":15},"shots":{"total":35,"on":15},"goals":{"total":4,"conceded":0,"assists":7,"saves":null},"passes":{"total":444,"key":29,"accuracy":12},"tackles":{"total":27,"blocks":1,"interceptions":5},"duels":{"total":232,"won":96},"dribbles":{"attempts":33,"success":19,"past":null},"fouls":{"drawn":29,"committed":32},"cards":{"yellow":0,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":2,"missed":1,"saved":null}}]},{"player":{"id":855,"name":"Jo\u00e3o Pedro Cavaco Cancelo","firstname":"Jo\u00e3o Pedro","lastname":"Cavaco Cancelo","age":28,"birth":{"date":"1994-05-27","place":"Barreiro","country":"Portugal"},"nationality":"Portugal","height":"182 cm","weight":"74 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/855.png"},"statistics":[{"team":{"id":50,"name":"Manchester City","logo":"https:\/\/media.api-sports.io\/football\/teams\/50.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":36,"lineups":36,"minutes":3228,"number":null,"position":"Defender","rating":"7.302777","captain":false},"substitutes":{"in":0,"out":1,"bench":1},"shots":{"total":50,"on":23},"goals":{"total":1,"conceded":0,"assists":7,"saves":null},"passes":{"total":2951,"key":39,"accuracy":69},"tackles":{"total":83,"blocks":3,"interceptions":59},"duels":{"total":425,"won":222},"dribbles":{"attempts":106,"success":56,"past":null},"fouls":{"drawn":26,"committed":34},"cards":{"yellow":7,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":1485,"name":"Bruno Fernandes","firstname":"Bruno Miguel","lastname":"Borges Fernandes","age":28,"birth":{"date":"1994-09-08","place":"Maia","country":"Portugal"},"nationality":"Portugal","height":"179 cm","weight":"69 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/1485.png"},"statistics":[{"team":{"id":33,"name":"Manchester United","logo":"https:\/\/media.api-sports.io\/football\/teams\/33.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":36,"lineups":35,"minutes":3119,"number":null,"position":"Midfielder","rating":"7.272222","captain":false},"substitutes":{"in":1,"out":9,"bench":1},"shots":{"total":55,"on":29},"goals":{"total":10,"conceded":0,"assists":6,"saves":null},"passes":{"total":1901,"key":91,"accuracy":41},"tackles":{"total":54,"blocks":null,"interceptions":17},"duels":{"total":340,"won":146},"dribbles":{"attempts":52,"success":26,"past":null},"fouls":{"drawn":47,"committed":33},"cards":{"yellow":10,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":2,"saved":null}}]}]};
console.log("도움 순위");
console.log("순위|이름|소속팀|경기|도움");
for(var i = 0; i < 20; i++){
console.log(topAssistJson.response[i].player.name + "|" + topAssistJson.response[i].statistics[0].team.name + "|" + topAssistJson.response[i].statistics[0].games.appearences + "|" + topAssistJson.response[i].statistics[0].goals.assists);
console.log((i+1).toString() + "|" + topAssistJson.response[i].player.name + "|" + topAssistJson.response[i].statistics[0].team.name + "|" + topAssistJson.response[i].statistics[0].games.appearences + "|" + topAssistJson.response[i].statistics[0].goals.assists);
}
// 순위가 안 뜬다. 즉, for문에 돌려서 1부터 계산해도 되겠지만, 공동순위 같은 경우 해결 어려움.
// 득점순위
let topScorerJson = {"get":"players\/topscorers","parameters":{"league":"39","season":"2021"},"errors":[],"results":20,"paging":{"current":0,"total":1},"response":[{"player":{"id":186,"name":"Son Heung-Min","firstname":"Heung-Min","lastname":"Son","age":30,"birth":{"date":"1992-07-08","place":"Chuncheon","country":"Korea Republic"},"nationality":"Korea Republic","height":"183 cm","weight":"78 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/186.png"},"statistics":[{"team":{"id":47,"name":"Tottenham","logo":"https:\/\/media.api-sports.io\/football\/teams\/47.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":35,"lineups":35,"minutes":3021,"number":null,"position":"Midfielder","rating":"7.505714","captain":false},"substitutes":{"in":0,"out":15,"bench":0},"shots":{"total":69,"on":49},"goals":{"total":23,"conceded":0,"assists":7,"saves":null},"passes":{"total":1015,"key":73,"accuracy":25},"tackles":{"total":15,"blocks":6,"interceptions":13},"duels":{"total":270,"won":118},"dribbles":{"attempts":92,"success":51,"past":null},"fouls":{"drawn":36,"committed":14},"cards":{"yellow":2,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":306,"name":"Mohamed Salah Ghaly","firstname":"Mohamed","lastname":"Salah Ghaly","age":30,"birth":{"date":"1992-06-15","place":"Mu\u1e25\u0101fa\u1e93at al Gharbiyya","country":"Egypt"},"nationality":"Egypt","height":"175 cm","weight":"71 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/306.png"},"statistics":[{"team":{"id":40,"name":"Liverpool","logo":"https:\/\/media.api-sports.io\/football\/teams\/40.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":35,"lineups":30,"minutes":2762,"number":null,"position":"Attacker","rating":"7.391428","captain":false},"substitutes":{"in":5,"out":5,"bench":5},"shots":{"total":101,"on":60},"goals":{"total":23,"conceded":0,"assists":13,"saves":null},"passes":{"total":1079,"key":64,"accuracy":24},"tackles":{"total":17,"blocks":1,"interceptions":6},"duels":{"total":309,"won":100},"dribbles":{"attempts":124,"success":53,"past":null},"fouls":{"drawn":23,"committed":12},"cards":{"yellow":1,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":5,"missed":1,"saved":null}}]},{"player":{"id":874,"name":"Cristiano Ronaldo","firstname":"Cristiano Ronaldo","lastname":"dos Santos Aveiro","age":37,"birth":{"date":"1985-02-05","place":"Funchal","country":"Portugal"},"nationality":"Portugal","height":"187 cm","weight":"83 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/874.png"},"statistics":[{"team":{"id":33,"name":"Manchester United","logo":"https:\/\/media.api-sports.io\/football\/teams\/33.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":30,"lineups":27,"minutes":2459,"number":null,"position":"Attacker","rating":"7.260000","captain":false},"substitutes":{"in":3,"out":6,"bench":3},"shots":{"total":80,"on":43},"goals":{"total":18,"conceded":0,"assists":3,"saves":null},"passes":{"total":879,"key":26,"accuracy":24},"tackles":{"total":8,"blocks":null,"interceptions":2},"duels":{"total":217,"won":88},"dribbles":{"attempts":32,"success":20,"past":null},"fouls":{"drawn":18,"committed":16},"cards":{"yellow":8,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":3,"missed":0,"saved":null}}]},{"player":{"id":184,"name":"Harry Kane","firstname":"Harry","lastname":"Kane","age":29,"birth":{"date":"1993-07-28","place":"London","country":"England"},"nationality":"England","height":"188 cm","weight":"86 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/184.png"},"statistics":[{"team":{"id":47,"name":"Tottenham","logo":"https:\/\/media.api-sports.io\/football\/teams\/47.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":37,"lineups":36,"minutes":3232,"number":null,"position":"Attacker","rating":"7.378378","captain":false},"substitutes":{"in":1,"out":1,"bench":1},"shots":{"total":97,"on":55},"goals":{"total":17,"conceded":0,"assists":9,"saves":null},"passes":{"total":874,"key":53,"accuracy":16},"tackles":{"total":15,"blocks":8,"interceptions":3},"duels":{"total":437,"won":198},"dribbles":{"attempts":100,"success":54,"past":null},"fouls":{"drawn":54,"committed":42},"cards":{"yellow":5,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":4,"missed":0,"saved":null}}]},{"player":{"id":304,"name":"Sadio Man\u00e9","firstname":"Sadio","lastname":"Man\u00e9","age":30,"birth":{"date":"1992-04-10","place":"Sedhiou","country":"Senegal"},"nationality":"Senegal","height":"175 cm","weight":"69 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/304.png"},"statistics":[{"team":{"id":40,"name":"Liverpool","logo":"https:\/\/media.api-sports.io\/football\/teams\/40.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":34,"lineups":32,"minutes":2825,"number":null,"position":"Attacker","rating":"7.202941","captain":false},"substitutes":{"in":2,"out":7,"bench":2},"shots":{"total":66,"on":39},"goals":{"total":16,"conceded":0,"assists":2,"saves":null},"passes":{"total":1036,"key":43,"accuracy":23},"tackles":{"total":33,"blocks":1,"interceptions":8},"duels":{"total":361,"won":160},"dribbles":{"attempts":77,"success":47,"past":null},"fouls":{"drawn":50,"committed":50},"cards":{"yellow":5,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":629,"name":"K. De Bruyne","firstname":"Kevin","lastname":"De Bruyne","age":31,"birth":{"date":"1991-06-28","place":"Drongen","country":"Belgium"},"nationality":"Belgium","height":"181 cm","weight":"68 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/629.png"},"statistics":[{"team":{"id":50,"name":"Manchester City","logo":"https:\/\/media.api-sports.io\/football\/teams\/50.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":30,"lineups":25,"minutes":2205,"number":null,"position":"Midfielder","rating":"7.780000","captain":false},"substitutes":{"in":5,"out":9,"bench":8},"shots":{"total":56,"on":31},"goals":{"total":15,"conceded":0,"assists":8,"saves":null},"passes":{"total":1358,"key":87,"accuracy":37},"tackles":{"total":32,"blocks":2,"interceptions":6},"duels":{"total":209,"won":101},"dribbles":{"attempts":55,"success":31,"past":null},"fouls":{"drawn":27,"committed":21},"cards":{"yellow":2,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":2678,"name":"Diogo Jota","firstname":"Diogo Jos\u00e9","lastname":"Teixeira da Silva","age":26,"birth":{"date":"1996-12-04","place":"Massarelos","country":"Portugal"},"nationality":"Portugal","height":"178 cm","weight":"68 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/2678.png"},"statistics":[{"team":{"id":40,"name":"Liverpool","logo":"https:\/\/media.api-sports.io\/football\/teams\/40.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":35,"lineups":27,"minutes":2373,"number":null,"position":"Attacker","rating":"7.028571","captain":false},"substitutes":{"in":8,"out":17,"bench":9},"shots":{"total":71,"on":33},"goals":{"total":15,"conceded":0,"assists":4,"saves":null},"passes":{"total":744,"key":41,"accuracy":15},"tackles":{"total":39,"blocks":2,"interceptions":6},"duels":{"total":384,"won":143},"dribbles":{"attempts":69,"success":27,"past":null},"fouls":{"drawn":40,"committed":41},"cards":{"yellow":3,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":18788,"name":"Jamie Vardy","firstname":"Jamie","lastname":"Vardy","age":35,"birth":{"date":"1987-01-11","place":"Sheffield","country":"England"},"nationality":"England","height":"179 cm","weight":"74 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/18788.png"},"statistics":[{"team":{"id":46,"name":"Leicester","logo":"https:\/\/media.api-sports.io\/football\/teams\/46.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":25,"lineups":20,"minutes":1806,"number":null,"position":"Attacker","rating":"7.104000","captain":false},"substitutes":{"in":5,"out":5,"bench":7},"shots":{"total":47,"on":26},"goals":{"total":15,"conceded":0,"assists":2,"saves":null},"passes":{"total":251,"key":18,"accuracy":7},"tackles":{"total":6,"blocks":null,"interceptions":1},"duels":{"total":141,"won":51},"dribbles":{"attempts":22,"success":9,"past":null},"fouls":{"drawn":12,"committed":13},"cards":{"yellow":2,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":3247,"name":"Wilfried Zaha","firstname":"Wilfried","lastname":"Zaha","age":30,"birth":{"date":"1992-11-10","place":"Abidjan","country":"C\u00f4te d'Ivoire"},"nationality":"C\u00f4te d'Ivoire","height":"180 cm","weight":"66 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/3247.png"},"statistics":[{"team":{"id":52,"name":"Crystal Palace","logo":"https:\/\/media.api-sports.io\/football\/teams\/52.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":33,"lineups":31,"minutes":2761,"number":null,"position":"Attacker","rating":"6.960606","captain":false},"substitutes":{"in":2,"out":2,"bench":2},"shots":{"total":51,"on":32},"goals":{"total":14,"conceded":0,"assists":1,"saves":null},"passes":{"total":909,"key":47,"accuracy":22},"tackles":{"total":40,"blocks":null,"interceptions":5},"duels":{"total":506,"won":228},"dribbles":{"attempts":152,"success":75,"past":null},"fouls":{"drawn":101,"committed":37},"cards":{"yellow":5,"yellowred":1,"red":0},"penalty":{"won":null,"commited":null,"scored":5,"missed":2,"saved":null}}]},{"player":{"id":645,"name":"Raheem Sterling","firstname":"Raheem","lastname":"Sterling","age":28,"birth":{"date":"1994-12-08","place":"Kingston","country":"Jamaica"},"nationality":"England","height":"170 cm","weight":"69 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/645.png"},"statistics":[{"team":{"id":50,"name":"Manchester City","logo":"https:\/\/media.api-sports.io\/football\/teams\/50.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":30,"lineups":23,"minutes":2127,"number":null,"position":"Attacker","rating":"7.036666","captain":false},"substitutes":{"in":7,"out":6,"bench":14},"shots":{"total":46,"on":28},"goals":{"total":13,"conceded":0,"assists":5,"saves":null},"passes":{"total":820,"key":42,"accuracy":23},"tackles":{"total":23,"blocks":null,"interceptions":12},"duels":{"total":278,"won":117},"dribbles":{"attempts":112,"success":53,"past":null},"fouls":{"drawn":37,"committed":19},"cards":{"yellow":1,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":2,"missed":1,"saved":null}}]},{"player":{"id":19428,"name":"J. Bowen","firstname":"Jarrod","lastname":"Bowen","age":26,"birth":{"date":"1996-12-20","place":"Leominster","country":"England"},"nationality":"England","height":null,"weight":null,"injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/19428.png"},"statistics":[{"team":{"id":48,"name":"West Ham","logo":"https:\/\/media.api-sports.io\/football\/teams\/48.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":36,"lineups":34,"minutes":2993,"number":null,"position":"Attacker","rating":"7.033333","captain":false},"substitutes":{"in":2,"out":12,"bench":2},"shots":{"total":56,"on":34},"goals":{"total":12,"conceded":0,"assists":10,"saves":null},"passes":{"total":714,"key":42,"accuracy":15},"tackles":{"total":36,"blocks":2,"interceptions":21},"duels":{"total":370,"won":167},"dribbles":{"attempts":88,"success":50,"past":null},"fouls":{"drawn":43,"committed":25},"cards":{"yellow":6,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":18784,"name":"J. Maddison","firstname":"James","lastname":"Maddison","age":26,"birth":{"date":"1996-11-23","place":"Coventry","country":"England"},"nationality":"England","height":"175 cm","weight":"73 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/18784.png"},"statistics":[{"team":{"id":46,"name":"Leicester","logo":"https:\/\/media.api-sports.io\/football\/teams\/46.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":35,"lineups":28,"minutes":2466,"number":null,"position":"Midfielder","rating":"7.302857","captain":false},"substitutes":{"in":7,"out":14,"bench":7},"shots":{"total":54,"on":34},"goals":{"total":12,"conceded":0,"assists":8,"saves":null},"passes":{"total":955,"key":49,"accuracy":22},"tackles":{"total":40,"blocks":3,"interceptions":11},"duels":{"total":254,"won":140},"dribbles":{"attempts":48,"success":31,"past":null},"fouls":{"drawn":64,"committed":22},"cards":{"yellow":3,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":0,"saved":null}}]},{"player":{"id":19974,"name":"I. Toney","firstname":"Ivan","lastname":"Toney","age":26,"birth":{"date":"1996-03-16","place":"Northampton","country":"England"},"nationality":"England","height":"179 cm","weight":"65 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/19974.png"},"statistics":[{"team":{"id":55,"name":"Brentford","logo":"https:\/\/media.api-sports.io\/football\/teams\/55.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":33,"lineups":32,"minutes":2908,"number":null,"position":"Attacker","rating":"7.339393","captain":false},"substitutes":{"in":1,"out":0,"bench":1},"shots":{"total":64,"on":30},"goals":{"total":12,"conceded":0,"assists":5,"saves":null},"passes":{"total":733,"key":43,"accuracy":13},"tackles":{"total":33,"blocks":2,"interceptions":14},"duels":{"total":540,"won":284},"dribbles":{"attempts":50,"success":24,"past":null},"fouls":{"drawn":80,"committed":50},"cards":{"yellow":8,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":5,"missed":0,"saved":null}}]},{"player":{"id":19220,"name":"M. Mount","firstname":"Mason","lastname":"Mount","age":23,"birth":{"date":"1999-01-10","place":"Portsmouth","country":"England"},"nationality":"England","height":"178 cm","weight":"70 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/19220.png"},"statistics":[{"team":{"id":49,"name":"Chelsea","logo":"https:\/\/media.api-sports.io\/football\/teams\/49.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":32,"lineups":27,"minutes":2365,"number":null,"position":"Midfielder","rating":"7.443750","captain":false},"substitutes":{"in":5,"out":7,"bench":8},"shots":{"total":55,"on":29},"goals":{"total":11,"conceded":0,"assists":10,"saves":null},"passes":{"total":1115,"key":58,"accuracy":29},"tackles":{"total":41,"blocks":1,"interceptions":13},"duels":{"total":230,"won":88},"dribbles":{"attempts":42,"success":18,"past":null},"fouls":{"drawn":23,"committed":30},"cards":{"yellow":4,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":1,"missed":0,"saved":null}}]},{"player":{"id":19366,"name":"O. Watkins","firstname":"Ollie","lastname":"Watkins","age":27,"birth":{"date":"1995-12-30","place":"Torbay","country":"England"},"nationality":"England","height":"180 cm","weight":"70 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/19366.png"},"statistics":[{"team":{"id":66,"name":"Aston Villa","logo":"https:\/\/media.api-sports.io\/football\/teams\/66.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":35,"lineups":33,"minutes":2955,"number":null,"position":"Attacker","rating":"6.891428","captain":false},"substitutes":{"in":2,"out":5,"bench":2},"shots":{"total":52,"on":32},"goals":{"total":11,"conceded":0,"assists":2,"saves":null},"passes":{"total":674,"key":35,"accuracy":13},"tackles":{"total":17,"blocks":3,"interceptions":12},"duels":{"total":382,"won":158},"dribbles":{"attempts":68,"success":37,"past":null},"fouls":{"drawn":39,"committed":33},"cards":{"yellow":7,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":1,"missed":0,"saved":null}}]},{"player":{"id":1460,"name":"B. Saka","firstname":"Bukayo","lastname":"Saka","age":21,"birth":{"date":"2001-09-05","place":"London","country":"England"},"nationality":"England","height":"178 cm","weight":"65 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/1460.png"},"statistics":[{"team":{"id":42,"name":"Arsenal","logo":"https:\/\/media.api-sports.io\/football\/teams\/42.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":38,"lineups":36,"minutes":2996,"number":null,"position":"Attacker","rating":"6.989473","captain":false},"substitutes":{"in":2,"out":20,"bench":2},"shots":{"total":58,"on":31},"goals":{"total":11,"conceded":0,"assists":7,"saves":null},"passes":{"total":1062,"key":69,"accuracy":22},"tackles":{"total":40,"blocks":2,"interceptions":22},"duels":{"total":371,"won":165},"dribbles":{"attempts":102,"success":43,"past":null},"fouls":{"drawn":59,"committed":39},"cards":{"yellow":6,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":2,"missed":0,"saved":null}}]},{"player":{"id":19085,"name":"Teemu Eino Antero Pukki","firstname":"Teemu Eino Antero","lastname":"Pukki","age":32,"birth":{"date":"1990-03-29","place":"Kotka","country":"Finland"},"nationality":"Finland","height":"180 cm","weight":"75 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/19085.png"},"statistics":[{"team":{"id":71,"name":"Norwich","logo":"https:\/\/media.api-sports.io\/football\/teams\/71.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":37,"lineups":37,"minutes":3261,"number":null,"position":"Attacker","rating":"6.724324","captain":false},"substitutes":{"in":0,"out":8,"bench":0},"shots":{"total":51,"on":27},"goals":{"total":11,"conceded":0,"assists":3,"saves":null},"passes":{"total":524,"key":27,"accuracy":10},"tackles":{"total":23,"blocks":1,"interceptions":4},"duels":{"total":290,"won":90},"dribbles":{"attempts":60,"success":27,"past":null},"fouls":{"drawn":25,"committed":31},"cards":{"yellow":4,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":3,"missed":0,"saved":null}}]},{"player":{"id":635,"name":"Riyad Mahrez","firstname":"Riyad","lastname":"Mahrez","age":31,"birth":{"date":"1991-02-21","place":"Sarcelles","country":"France"},"nationality":"Algeria","height":"179 cm","weight":"67 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/635.png"},"statistics":[{"team":{"id":50,"name":"Manchester City","logo":"https:\/\/media.api-sports.io\/football\/teams\/50.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":28,"lineups":15,"minutes":1491,"number":null,"position":"Attacker","rating":"7.260714","captain":false},"substitutes":{"in":13,"out":5,"bench":21},"shots":{"total":44,"on":23},"goals":{"total":11,"conceded":0,"assists":5,"saves":null},"passes":{"total":826,"key":40,"accuracy":26},"tackles":{"total":11,"blocks":1,"interceptions":6},"duels":{"total":142,"won":60},"dribbles":{"attempts":50,"success":26,"past":null},"fouls":{"drawn":15,"committed":10},"cards":{"yellow":0,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":4,"missed":1,"saved":null}}]},{"player":{"id":1496,"name":"Raphinha","firstname":"Raphael","lastname":"Dias Belloli","age":26,"birth":{"date":"1996-12-14","place":"Porto Alegre","country":"Brazil"},"nationality":"Brazil","height":"176 cm","weight":"58 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/1496.png"},"statistics":[{"team":{"id":63,"name":"Leeds","logo":"https:\/\/media.api-sports.io\/football\/teams\/63.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":35,"lineups":34,"minutes":2922,"number":null,"position":"Attacker","rating":"6.954285","captain":false},"substitutes":{"in":1,"out":8,"bench":1},"shots":{"total":62,"on":25},"goals":{"total":11,"conceded":0,"assists":3,"saves":null},"passes":{"total":1074,"key":67,"accuracy":21},"tackles":{"total":51,"blocks":null,"interceptions":29},"duels":{"total":420,"won":182},"dribbles":{"attempts":146,"success":62,"past":null},"fouls":{"drawn":47,"committed":40},"cards":{"yellow":7,"yellowred":0,"red":0},"penalty":{"won":null,"commited":null,"scored":4,"missed":0,"saved":null}}]},{"player":{"id":18819,"name":"Michail Gregory Antonio","firstname":"Michail Gregory","lastname":"Antonio","age":32,"birth":{"date":"1990-03-28","place":"London","country":"England"},"nationality":"Jamaica","height":"180 cm","weight":"82 kg","injured":false,"photo":"https:\/\/media.api-sports.io\/football\/players\/18819.png"},"statistics":[{"team":{"id":48,"name":"West Ham","logo":"https:\/\/media.api-sports.io\/football\/teams\/48.png"},"league":{"id":39,"name":"Premier League","country":"England","logo":"https:\/\/media.api-sports.io\/football\/leagues\/39.png","flag":"https:\/\/media.api-sports.io\/flags\/gb.svg","season":2021},"games":{"appearences":36,"lineups":34,"minutes":2980,"number":null,"position":"Attacker","rating":"6.966666","captain":false},"substitutes":{"in":2,"out":10,"bench":3},"shots":{"total":59,"on":29},"goals":{"total":10,"conceded":0,"assists":8,"saves":null},"passes":{"total":615,"key":46,"accuracy":11},"tackles":{"total":23,"blocks":1,"interceptions":3},"duels":{"total":489,"won":204},"dribbles":{"attempts":93,"success":50,"past":null},"fouls":{"drawn":52,"committed":50},"cards":{"yellow":7,"yellowred":1,"red":0},"penalty":{"won":null,"commited":null,"scored":0,"missed":1,"saved":null}}]}]};
console.log("득점 순위");
console.log("순위|이름|소속팀|경기|득점");
for(var i = 0; i < 20; i++){
console.log(topScorerJson.response[i].player.name + "|" + topScorerJson.response[i].statistics[0].team.name + "|" + topScorerJson.response[i].statistics[0].games.appearences + "|" + topScorerJson.response[i].statistics[0].goals.total);
console.log((i+1).toString() + "|" + topScorerJson.response[i].player.name + "|" + topScorerJson.response[i].statistics[0].team.name + "|" + topScorerJson.response[i].statistics[0].games.appearences + "|" + topScorerJson.response[i].statistics[0].goals.total);
}
// 순위가 안 뜬다. 즉, for문에 돌려서 1부터 계산해도 되겠지만, 공동순위 같은 경우 해결 어려움.
......@@ -20,6 +23,8 @@ let standingJson = {"get":"standings","parameters":{"league":"39","season":"2021
// console.log(standingJson);
// console.log(standingJson.response[0]);
// console.log(standingJson.response[0].league);
console.log("도움 순위");
console.log("순위|팀명|경기|득점|승리|무승부|패배|득점|??");
for(var i = 0; i < 20; i++){
console.log(standingJson.response[0].league.standings[0][i].rank + "|" + standingJson.response[0].league.standings[0][i].team.name + "|" + standingJson.response[0].league.standings[0][i].all.played + "|" + standingJson.response[0].league.standings[0][i].points + "|" + standingJson.response[0].league.standings[0][i].all.win + "|" + standingJson.response[0].league.standings[0][i].all.draw + "|" + standingJson.response[0].league.standings[0][i].all.lose + "|" + standingJson.response[0].league.standings[0][i].all.goals.for + "|" + standingJson.response[0].league.standings[0][i].all.goals.against);
}
......
......@@ -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
......