1.0.5 • Published 3 years ago
nfl-stats v1.0.5
NFL Stat Tracker Package.
This package can fetch any NFL related statistic.
Installation
Install nfl-stats with npm
npm install nfl-statsUsage/Examples
Get Weekly Games
const nfl = require("nfl-stats");
let weeklyGames = await nfl.getWeeklyGames();Output
[{
id: (STRING , game id),
date: (STRING , game date & time),
team1: (STRING, team #1 name),
team2: (STRING, team #2 name),
},
{etc..},
{etc..}]Get Game Score
const nfl = require("nfl-stats");
let score = await nfl.getGameScore(${gameID});Output
[{
team: (STRING , team name),
date: (STRING , score),
},
{
team: (STRING , team name),
date: (STRING , score),
}]Get Team Logo
const nfl = require("nfl-stats");
let logoUrl = await nfl.getTeamLogo(${teamID});Output
{
team: (STRING , team name),
logo-url: (STRING , URL to team logo),
}Get Current Week
const nfl = require("nfl-stats");
let week = await nfl.getCurrentWeek();Output
{
team: (STRING , week number),
}Get Player ID From Name
const nfl = require("nfl-stats");
let id = await nfl.getAthleteId("George Kittle");Output
{
id: (STRING , player id),
}Get Player Photo URL
const nfl = require("nfl-stats");
let photoUrl = await nfl.getAthleteHeadshotImage(${PlayerID});Output
{
headshotURL: (STRING , headshot URL),
}Usuful IDs
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Authors
- Andrew Abercrombie @AndrewAbercrombie