Team Game Stat Example

Use case - Retrieve Team Stat in particular Game

Field Selector:

{
    id,
    fullName,
    teamGameStats{id,team{id},game{id,homeTeamScore},passingStats{passingAttempts,passingCompleteions},rushingStats{rushingAttpempts,rushingAttemptsPerGame}}

}

Query:

{
    "$teamGameStats" : {
        "$query": {
                "game.week":4,
                "game.season": 2014,
                "game.seasonType": "REG",
                "game.homeTeam.abbr": "SEA"
        }
    }
}

Request:

GET  /teams?fs={id,fullName,teamGameStats{id,game{id,homeTeamScore},passingStats{attempts,completions},rushingStats{attempts,yardsPerAttempt}}}&s={
    "$teamGameStats" : {"$query": {"game.week":4,"game.season": 2014,"game.seasonType": "REG","game.homeTeam.abbr": "SEA"}}}

Response:

``` { "pager" : {}, "data" : [ { "id": "525f365e-77fa-4e93-8413-f69705b19ade", "fullName": "Seattle Seahawks", "teamGameStats": [ { "id": "13a25169-509c-408e-9306-832641609f49", "game": { "id": "02e4d663-f789-4b47-8e67-7e4e6f5c5bd7", "homeTeamScore": { "pointsTotal": 28, "pointsQ1": 10, "pointsQ2": 6, "pointsQ3": 6, "pointsQ4": 3, "pointsOvertime": 3, "pointsOvertimeTotal": 3 } }, "passingStats": { "attempts": 10, "completions": 6 }, "rushingStats": { "attempts": 2, "yardsPerAttempt": 2 } } ] } ] }