https://github.com/beevelop/football-api
https://github.com/beevelop/football-api
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/beevelop/football-api
- Owner: beevelop
- Created: 2017-02-28T10:17:43.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-06-19T20:33:37.000Z (over 3 years ago)
- Last Synced: 2025-05-31T13:01:38.024Z (9 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/football-api)
[](https://gemnasium.com/beevelop/football-api)
[](http://standardjs.com/)
[](https://beevelop.com)
# Football-API.js
```js
const FootballAPI = require('football-api')
const fapi = new FootballAPI('*YOUR AUTHORIZATION KEY*')
// Get all matches
fapi.getMatches().then((data) => {
console.log(data.body)
}).catch(err => console.log(err))
// Get a team
fapi.getTeam(9002).then((data) => console.log(data.body.statistics[0]))
// Get a commentary
fapi.getCommentary(1967661).then((data) => {
console.log(util.inspect(data.body, false, null))
}).catch((err) => console.log(err))
```