Player Team Stats Queries

The Player Team Stats endpoint provide a way to query various stats players have for the teams they are on.

Use case - Retrieve stats for players on the New England Patriots team who had over 250 rushing yards in the 2014 regular season.

Field Selector:

{
    player{firstName,lastName,team(nickName)},
    rushing{attempts,yards,touchdowns,fumbles}    
}

Query:

{
    "$query":
        {
            "team.nickName" : "Patriots"
            "season": 2014,
            "seasonType": "REG",
            "rushing.yards": {"$gt" : 250}
        }
}

Request:

GET  /playerTeamStats?fs={player{firstName,lastName,team{nickName}},rushing{attempts,yards,touchdowns,fumbles}}}&s={"$query":{"team.nickName":"Patriots",season":2014,"seasonType":"REG","rushing.yards":{"$gt" : 250}}}

Response:

{
    "playerSeasonStats": {
        "pager": {
        },
        "data": [
            {
                "player": {
                    "firstName": "Jonas",
                    "lastName": "Gray",
                    "team": {
                        "nickName": "Patriots"
                    }
                }
                "rushing": {
                            "attempts": 89,
                            "yards": 412,
                            "touchdowns": 5,
                            "fumbles": 0
                }
            },
            {
                "player": {
                    "firstName": "Shane",
                    "lastName": "Vereen",
                    "team": {
                        "nickName": "Patriots"
                    }
                }
                "rushing": {
                            "attempts": 96,
                            "yards": 391,
                            "touchdowns": 2,
                            "fumbles": 0
                }
            },
            {
                "player": {
                    "firstName": "Stevan",
                    "lastName": "Ridley",
                    "team": {
                        "nickName": "Patriots"
                    }
                }
                "rushing": {
                            "attempts": 94,
                            "yards": 340,
                            "touchdowns": 2,
                            "fumbles": 0
                }
            },
            {
                "player": {
                    "firstName": "LeGarrette",
                    "lastName": "Blount",
                    "team": {
                        "nickName": "Patriots"
                    }
                }
                "rushing": {
                            "attempts": 60,
                            "yards": 281,
                            "touchdowns": 3,
                            "fumbles": 0
                }
            }
        ]
    }
}