1.1.5 • Published 1 year ago

soccer-history v1.1.5

Weekly downloads
3
License
MIT
Repository
github
Last release
1 year ago

SoccerHistory

해외 축구 경기 결과를 불러와주는 라이브러리입니다.

npm version Build Status GitHub license GitHub stars HitCount

여러 해외 축구 리그 경기 결과를 조회할 수 있는 라이브러리입니다! 지원하는 리그는 다음과 같습니다.

  • 프리미어리그
  • 라리가
  • 분데스
  • 세리에 A
  • 리그 1
  • 챔피언스리그
  • 유로파리그
  • FA컵
  • EFL컵
  • 코파델레이

    2010년~의 경기 결과만 지원합니다

사용 예제

import SoccerHistory from "soccer-history";

let sc = new SoccerHistory();
sc.getHistory("epl", new Date("2020/1/11")).then((data) => console.log(data));
/*
[ { homeTeamName: '셰필드',
    awayTeamName: '웨스트햄',
    homeTeamScore: '1',
    awayTeamScore: '0',
    gameDate: '2020-01-11',
    state: '종료' },
  { homeTeamName: '크리스탈 팰리스',
    awayTeamName: '아스널',
    homeTeamScore: '1',
    awayTeamScore: '1',
    gameDate: '2020-01-11',
    state: '종료' } ]
*/

sc.getHistory("champs", new Date("2020/1/10")).then((data) => console.log(data));
/* [] */

개발 환경 설정

npm install soccer-history
or
yarn add soccer-history

Test

npm run test

or

yarn test

사용 방법

class SoccerHistory

getHistory(leagueType: League, date: Date)

리그와 날짜를 넘겨주면 해당 경기 결과를 불러옵니다.

2010~현재까지의 경기를 불러올 수 있습니다

Ex)

[{ homeTeamName: '크리스탈 팰리스',
    awayTeamName: '아스널',
    homeTeamScore: '1',
    awayTeamScore: '1',
    gameDate: '2020-01-11',
    state: '종료' }]

만약 해당 날에 경기가 없다면 빈 배열([])을 반환합니다

League

리그 이름League
프리미어리그epl
라리가primera
분데스bundesliga
세리에 Aseria
리그 1ligue1
챔피언스리그champs
유로파리그europa
FA컵facup
EFL컵carlingcup
코파델레이copadelrey

업데이트 내역

  • 1.1.4 예제 추가
  • 1.1.3 test 폴더 이동
  • 1.1.2 @types 추가
  • 1.1.1 의존성 잘못 설정된 부분 수정
  • 1.0.0 초기 버전 배포(이전 버전에서 모듈 export 제대로 안되던 문제 수정)

정보

MIT 라이센스를 준수하며 LICENSE에서 자세한 정보를 확인할 수 있습니다.

1.1.5

1 year ago

1.1.4

4 years ago

1.1.1

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.0

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago