Teams Example

Example: Retrieve the most recent standings from Team object for a specific team

Field selector:

{
    nickName,
    standings{
        week{
            seasonType,
            week
        },
        overallWins,
        overallWinPct,
        overallLosses,
        overallTies,
        overallRank
    }
}

Query:

{
    "$query":{"abbr" : "SEA", "season": 2014 "statndings":{"$query":{week.seasonType": "REG"}}}
}

Request:GET /teams?fs={nickName,standings{week{seasonType,week},overallWins,overallLosses,overallTies,overallRank}}&s={"$query":{"abbr":"SEA","season":2014,"standings":{"$query":{"week.seasonType":"REG"}}}}

Response payload:

{
    "pager" : {},
    "data" : [
        {
            "nickName": "Seahawks",
            "standings": {
                "week": {
                    "seasonType": "REG",
                    "week": 17
                },
                "overallWins": 12,
                "overallLosses": 4,
                "overallTies": 0,
                "overallRank": 2
            }
        }
    ]
}

Example: Retrieve http://www.nfl.com/standings page 2014 season standings for all teams

Field selector:

{
    fullName,
    conference,
    division,
    standings {
            overallWins,overallLosses,overallTies,overallPointsFor,overallPointsAgainst,
            netTouchDowns,homeWins,homeLosses,roadWins,roadLosses,divisionWins,divisionLosses,
            conferenceWins,conferenceLosses,overallStreak,last5Wins,last5Losses
    }
}

Query:

    {
        "$query":{"season" : "2014"}
    }

Request: GET /teams?s={"$query":{"season":"2014"}}&fs={season,fullName,conference,division,standings{overallWins,overallLosses,overallTies,overallPointsFor,overallPointsAgainst,netTouchDowns,homeWins,homeLosses,roadWins,roadLosses,divisionWins,divisionLosses,conferenceWins,conferenceLosses,overallStreak,last5Wins,last5Losses}}

Response payload:

{
    "pager" : {},
    "data" : [
        {
            "fullName": "New England Patriots",
            "conference": "AFC",
            "division": "ACE",
            "standings" :
            {
                "overallWins":2,
                "overallLosses":2,
                "overallTies":0,
                "overallPtsFor":91,
                "overallPtsAgainst":81,
                "netTouchdowns":2,
                "homeWins":2,
                "homeLosses":0,
                "roadWins":0,
                "roadLosses":2,
                "divisionWins":0,
                "divisionLosses":0,
                "conferenceWins":0,
                "conferenceLosses":0,
                "overallStreak":"1L",
                "last5Wins":2,
                "last5Losses":2,
            }
        },
        ...
    ]    
}

Example: Retrieve http://www.nfl.com/standings for 2016 season and season type REG

Field selector:

{
    id,
    season,
    fullName,
    nickName,
    cityStateRegion,
    abbr,
    teamType,
    conference{
        abbr
    },
    division{
        abbr
    },
    standings{
        overallWins,
        overallWinPct,
        overallLosses,
        overallTies,
        overallWinPct,
        divisionWins,
        divisionLosses,
        divisionTies,
        clinchDivision,
        clinchDivisionAndHomefield,
        clinchWildcard,
        clinchPlayoff,
        conferenceRank,
        divisionRank,
        playoffStatus,
        divisionLeaderGamesBack,
        wildcardGamesBack
    }
}

Query:

{
    "$query":{
        "season":2016,
        "standings":{
            "$query":{
                "week.seasonType":"REG"
            }
        },
        "$takeLast":1
    }
}

Request: GET /teams/?fs={id,season,fullName,nickName,cityStateRegion,abbr,teamType,conference{abbr},division{abbr},standings{overallWins,overallWinPct,overallLosses,overallTies,overallWinPct,divisionWins,divisionLosses,divisionTies,clinchDivision,clinchDivisionAndHomefield,clinchWildcard,clinchPlayoff,conferenceRank,divisionRank,playoffStatus,divisionLeaderGamesBack,wildcardGamesBack}}&s={"$query":{"season":2016,"standings":{"$query":{"week.seasonType":"REG"}},"$takeLast":1}}

Response payload:

{
  "pager": {
    "total": 2
  },
  "data": [
    {
      "id": "10040200-2016-a001-88fe-64a3d94b3ac9",
      "season": null,
      "fullName": "Atlanta Falcons",
      "nickName": "Falcons",
      "abbr": "ATL",
      "cityStateRegion": "Atlanta",
      "teamType": null,
      "conference": {
        "abbr": "NFC"
      },
      "division": {
        "abbr": "NCS"
      },
      "standings": {
        "pager": {
          "total": 1
        },
        "data": [
          {
            "overallWins": 10,
            "overallLosses": 5,
            "overallTies": 0,
            "divisionWins": 4,
            "divisionLosses": 1,
            "divisionTies": 0,
            "conferenceRank": 2,
            "divisionRank": 1,
            "clinchDivision": true,
            "clinchDivisionAndHomefield": false,
            "clinchWildcard": false,
            "overallWinPct": 0,
            "clinchPlayoff": true,
            "playoffStatus": "NOT_CLINCH_PLAYOFF",
            "divisionLeaderGamesBack": 0.0,
            "wildcardGamesBack": 0.0
          }
        ]
      }
    },
    {
      "id": "10040325-2016-c6f3-2780-a3d500cb0127",
      "season": null,
      "fullName": "Baltimore Ravens",
      "nickName": "Ravens",
      "abbr": "BAL",
      "cityStateRegion": "Baltimore",
      "teamType": null,
      "conference": {
        "abbr": "AFC"
      },
      "division": {
        "abbr": "ACN"
      },
      "standings": {
        "pager": {
          "total": 1
        },
        "data": [
          {
            "overallWins": 8,
            "overallLosses": 7,
            "overallTies": 0,
            "divisionWins": 4,
            "divisionLosses": 1,
            "divisionTies": 0,
            "conferenceRank": 7,
            "divisionRank": 2,
            "clinchDivision": false,
            "clinchDivisionAndHomefield": false,
            "clinchWildcard": false,
            "overallWinPct": 0,
            "clinchPlayoff": false,
            "playoffStatus": "NOT_CLINCH_PLAYOFF",
            "divisionLeaderGamesBack": 2.0,
            "wildcardGamesBack": 2.0
          }
        ]
      }
    }
  ]
}