Package Exports
- livesoccertv-parser
- livesoccertv-parser/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (livesoccertv-parser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
livesoccertv-parser
© All rights reserved to Live soccer TV
Parse games info from livesoccertv
Install
npm install livesoccertv-parserUsage
The parser works with promises:
const {getMatches} = require('livesoccertv-parser')
console.log(await getMatches('spain', 'real-madrid')) //=> [{...}, {...}, ...]Match object:
Match {
live: false,
played: true,
competition: 'Supercopa de España',
date: 'August 13',
time: '4:00 PM',
game: 'Barcelona vs Real Madrid',
tvs:
[
'TeleCinco',
'TV3',
'Radio Barca'
]
}API
- Timezone
By default, the timezone is America/New_York. You can set your own with:
getMatches('spain', 'real-madrid', { timezone: 'Europe/Madrid' })
getMatches('england', 'arsenal', { timezone: 'Europe/London' })- Search
You can search for teams like so:
const {searchTeams} = require("livesoccertv-parser")
searchTeams("madrid")
// [
// ["spain", "real-madrid"],
// ["spain", "atletico-madrid"],
// ]Contribute
Feel free to open an issue or a PR.
License
MIT
Related
More at pablopunk.com
- microsoccer: Microservice to fetch soccer games schedules and tv channels.
Author
| © 2018 Pablo Varela |