1.0.5 • Published 1 year ago

nfl-stats v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

NFL Stat Tracker Package.

This package can fetch any NFL related statistic.

Installation

Install nfl-stats with npm

npm install nfl-stats

Usage/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

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago