Player Season Stats Example

Use case - Retrieve Tom Brady Season Stats in 2014 Regular season.

Field Selector:

{
    id,
    firstName,
    lastName,
    playerStats{seasonStats{season,seasonType,passingStats{attempts,completions},rushingStats{attempts,yardsPerAttempt}}}

}

Query:

{
    "$query":
        {
            "firstName" : "Tom",
            "lastName" : "Brady",
        },
    "$playerStats" : {
        "$seasonStats" : {
            "$query": { 
                "season" : 2014,
                "seasonType" : "REG"
            }
        }
    }
}

Request:

GET  /persons?fs={id,firstName,lastName,playerStats{seasonStats{season,seasonType,passingStats{attempts,completions},rushingStats{attempts,yardsPerAttempt}}}}&s={
    "$query":{"firstName" : "Tom","lastName" : "Brady",},"$playerStats" : {"$seasonStats" : {"$query": {"season" : 2014,"seasonType" : "REG"}}}}

Response:

{
    "pager" : {},
    "data" : [
        {
            "id": "525f365e-77fa-4e93-8413-f69705b19ade",
            "firstName": "Tom",
            "lastName" : "Brady",
            "playerStats": {
                "seasonStats" : 
                [
                    {
                        "season" : 2014,
                        "seasonType" : "REG",
                        "passingStats": {
                            "attempts": 600,
                            "completions": 400
                        },
                        "rushingStats": {
                            "attempts": 17,
                            "yardsPerAttempt": 1
                        }
                    }
                ]
            }
        }
    ]
}

To perform queries based on specific player season stats, use the /playerSeasonStats endpoint instead.