
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
api-sports
Advanced tools
An easy-to-use Node.js wrapper for the API Sports service.
You can install api-sports using npm:
npm install api-sports
First, import the Sports class from the api-sports package:
const Sports = require('api-sports');
If you're using ES6 imports:
import Sports from 'api-sports';
Then, create a new Sports instance with your API key:
const sports = new Sports('your-api-key');
You can then use any of the available methods to make requests to the API. For example, if we to make a request to the football endpoint, the football method takes two parameters: the endpoint URL (as a string), and an object of query parameters:
sports.football('leagues', { id: 39 }) // || /leagues
.then(data => console.log(data))
.catch(error => console.error(error));
// should log
{
// ...
response: [
{
league: {
id: 39,
// ...
}
}
]
}
americanFootball(url, params)Makes a GET request to the american football API endpoints. API Docs
url: The endpoint URL (as a string).params: An object of query parameters.Returns a Promise that resolves with the response data.
basketball(url, params)Makes a GET request to the basketball API endpoints. API Docs
baseball(url, params)Makes a GET request to the baseball API endpoints. API Docs
football(url, params)Makes a GET request to the football API endpoints. API Docs
formula1(url, params)Makes a GET request to the formula 1 API endpoints. API Docs
handball(url, params)Makes a GET request to the handball API endpoints. API Docs
hockey(url, params)Makes a GET request to the hockey API endpoints. API Docs
nba(url, params)Makes a GET request to the nba API endpoints. API Docs
rugby(url, params)Makes a GET request to the rugby API endpoints. API Docs
volleyball(url, params)Makes a GET request to the volleyball API endpoints. API Docs
Contributions are welcome! Please submit a pull request or create an issue to get started.
FAQs
An easy-to-use Node.js wrapper for the API Sports service.
The npm package api-sports receives a total of 18 weekly downloads. As such, api-sports popularity was classified as not popular.
We found that api-sports demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.