NFL

From webCoRE Wiki - Web-enabled Community's own Rule Engine
Jump to: navigation, search
Share on FacebookShare on TwitterShare on Google+Share on LinkedInShare on DiggShare on deliciousShare on redditShare on StumbleUpon
The $NFL data api will return information related to the National Football League. You will be able to get information about your favorite team and their schedule as well as the current score, games won, lost, tied and so much more.

Team IDs

The Team ID will be useful in obtaining relevant information about your team. Take note of your team's ID listed below.
ARI:[id:ARI, location:Arizona, full:Arizona Cardinals, name:Cardinals]
ATL:[id:ATL, location:Atlanta, full:Atlanta Falcons, name:Falcons]
BAL:[id:BAL, location:Baltimore, full:Baltimore Ravens, name:Ravens]
BUF:[id:BUF, location:Buffalo, full:Buffalo Bills, name:Bills]
CAR:[id:CAR, location:Carolina, full:Carolina Panthers, name:Panthers]
CHI:[id:CHI, location:Chicago, full:Chicago Bears, name:Bears]
CIN:[id:CIN, location:Cincinnati, full:Cincinnati Bengals, name:Bengals]
CLE:[id:CLE, location:Cleveland, full:Cleveland Browns, name:Browns]
DAL:[id:DAL, location:Dallas, full:Dallas Cowboys, name:Cowboys]
DEN:[id:DEN, location:Denver, full:Denver Broncos, name:Broncos]
DET:[id:DET, location:Detroit, full:Detroit Lions, name:Lions]
GB:[id:GB, location:Green Bay, full:Green Bay Packers, name:Packers]
HOU:[id:HOU, location:Houston, full:Houston Texans, name:Texans]
IND:[id:IND, location:Indianapolis, full:Indianapolis Colts, name:Colts]
JAX:[id:JAX, location:Jacksonville, full:Jacksonville Jaguars, name:Jaguars]
KC:[id:KC, location:Kansas City, full:Kansas City Chiefs, name:Chiefs]
LA:[id:LA, location:Los Angeles, full:Los Angeles Rams, name:Rams]
LAC:[id:LAC, location:Los Angeles, full:Los Angeles Chargers, name:Chargers]
MIA:[id:MIA, location:Miami, full:Miami Dolphins, name:Dolphins]
MIN:[id:MIN, location:Minnesota, full:Minnesota Vikings, name:Vikings]
NE:[id:NE, location:New England, full:New England Patriots, name:Patriots]
NO:[id:NO, location:New Orleans, full:New Orleans Saints, name:Saints]
NYG:[id:NYG, location:New York, full:New York Giants, name:Giants]
NYJ:[id:NYJ, location:Jets, full:N.Y.J., name:New York Jets]
OAK:[id:OAK, location:Oakland, full:Oakland Raiders, name:Raiders]
PHI:[id:PHI, location:Philadelphia, full:Philadelphia Eagles, name:Eagles]
PIT:[id:PIT, location:Pittsburgh, full:Pittsburgh Steelers, name:Steelers]
SEA:[id:SEA, location:Seattle, full:Seattle Seahawks, name:Seahawks]
SF:[id:SF, location:San Francisco, full:San Francisco 49ers, name:49ers]
TB:[id:TB, location:Tampa Bay, full:Tampa Bay Buccaneers, name:Buccaneers]
TEN:[id:TEN, location:Tennessee, full:Tennessee Titans, name:Titans]
WAS:[id:WAS, location:Washington, full:Washington Redskins, name:Redskins]

Schedule

Syntax Base
$nfl.schedule
More Options
$nfl.schedule.thisweek >>> returns all of this week games
$nfl.schedule.games.length
$nfl.schedule.games[0]
$nfl.schedule.games[0].home >>> returns the ID of the home team
$nfl.schedule.games[0].away >>> returns the ID of the away team
$nfl.schedule.games[0].played >>> returns true if the game was already played
$nfl.schedule.games[0].score.home >>> returns the points scored by the home team
$nfl.schedule.games[0].score.away >>> returns the points scored by the away team
$nfl.schedule.games[0].score.display >>> returns the score in a nicely formatted way HM (0) - (0) AW
Example
$nfl.schedule.games[0].score.display will display ARI (18) at DAL (20)

Specific Team

Provides info about the team as well as their games
$nfl.(teamID)
More Options
$nfl.NE.played >>> returns the number of games played this season (preseason + regular + postseason)
$nfl.NE.won >>> returns the number of games won this season (preseason + regular + postseason)
$nfl.NE.tied >>> returns the number of games tied this season (preseason + regular + postseason)
$nfl.NE.lost >>> returns the number of games lost this season (preseason + regular + postseason)
$nfl.NE.preseason.played >>> returns the number of games played this preseason
$nfl.NE.preseason.won >>> returns the number of games won this preseason
$nfl.NE.preseason.tied >>> returns the number of games tied this preseason
$nfl.NE.preseason.lost >>> returns the number of games lost this preseason
$nfl.NE.regular.played >>> returns the number of games played this regular season
$nfl.NE.regular.won >>> returns the number of games won this regular season
$nfl.NE.regular.tied >>> returns the number of games tied this regular season
$nfl.NE.regular.lost >>> returns the number of games lost this regular season
$nfl.NE.postseason.played >>> returns the number of games played this postseason
$nfl.NE.postseason.won >>> returns the number of games won this postseason
$nfl.NE.postseason.tied >>> returns the number of games tied this postseason
$nfl.NE.postseason.lost >>> returns the number of games lost this postseason
$nfl.NE.yesterday >>> returns the game the team had yesterday, if any
$nfl.NE.today >>> returns the game the team has today, if any
$nfl.NE.tomorrow >>> returns the game the team has tomorrow, if any
$nfl.NE.mon >>> returns the game the team has this NFL’s week Monday
$nfl.NE.monday >>> returns the game the team has this NFL’s week Monday
$nfl.NE.lastWeek >>> returns the game the team had last NFL’s week
$nfl.NE.thisWeek >>> returns the game the team has this NFL’s week
$nfl.NE.nextWeek >>> returns the game the team has next NFL’s week
Example
$nfl.NE.preseason.lost will display 3

Specific Team Games

For every game returned with any of the above methods, you get these options
$nfl.NE.thisWeek.year >>> returns the year
$nfl.NE.thisWeek.month >>> returns the month
$nfl.NE.thisWeek.day >>> returns the day
$nfl.NE.thisWeek.wday >>> returns the week day, i.e. Thu
$nfl.NE.thisWeek.week >>> returns the week # of the current season, PRE, REG or POST
$nfl.NE.thisWeek.time >>> returns the time, i.e. 8:30
$nfl.NE.thisWeek.meridiem >>> returns AM or PM
$nfl.NE.thisWeek.season_type >>> returns the season type, one of PRE, REG, or POST
$nfl.NE.thisWeek.played >>> returns true if the game was already played
$nfl.NE.thisWeek.won >>> returns true if the game was won
$nfl.NE.thisWeek.tied >>> returns true if the game was tied
$nfl.NE.thisWeek.lost >>> returns true if the game was lost
$nfl.NE.thisWeek.score.home >>> returns the score of the home team
$nfl.NE.thisWeek.score.away >>> returns the score of the away team
$nfl.NE.thisWeek.score.display >>> formatted score
$nfl.NE.thisWeek.opponent.location >>> returns the location of the opponent team, i.e. Kansas City
$nfl.NE.thisWeek.opponent.name >>> returns the short name of the opponent team, i.e. Chiefs
$nfl.NE.thisWeek.opponent.full >>> returns the full name of the opponent team, i.e. Kansas City Chiefs
Example
$nfl.NE.thisWeek.opponent.full displays Kansas City Chiefs

Conditions (In Progress)

Things that can be evaluated in your pistons
team has game today?

Triggers (In Progress)

Things that can happen to execute your pistons
team’s game started
team scored (yey)
team’s game’s score changed
team’s game ended
team won game
team lost game