Skip to main content

2 posts tagged with "last5"

View All Tags

How It Works - Last 5/10 Minutes

ยท 2 min read
Nick Eggleton

GET Endpointsโ€‹

The match stat GET endpoints now provides a new filter parameter called "lastXSeconds". This parameters filters the stats so they only count transactions that occurred on or within the last 'X' seconds of the match.

If used on a live match and called periodically, the stats will go up and down based on what's happened in the last number of seconds. As it is a 'seconds' filter, enter 300 to filter the last 5 minutes, 600 for last 10.

From and To Period Secondsโ€‹

Two more parameters have been added to the endpoints alongside lastXSeconds: fromPeriodSeconds and toPeriodSeconds.

These can be used to filter statistics to a particular range of time within a quarter. They can be used independently of each other, where they will run from the start/end of the quarter, or together to focus on a mid-quarter window.

note

These parameters aren't used in Last 5/10 Minutes filtering, and described here for completeness. Also note that you cannot use all three parameters at the same time - the API will return an error message stating this is the case.

POST Endpointsโ€‹

The match stat POST endpoints also support these parameters, they can be supplied in each metic request, and in different combinations in each request. They perform the same filtering as they do for the GET Endpoints.

R Package Support

The R package's getPlayerStats and getSquadStats function also include 'lastXSeconds' parameters to be used in the same fashion as calling the API endpoints directly. It too supports using the parameters in the getPlayerStatsPOST and getSquadStatsPOST endpoints. See here for more details.

Work in Progress - Last 5/10 Minutes

ยท One min read
Nick Eggleton

Over the past few weeks, the team have been busily working on some new time parameters to the match statistics endpoints. They are intended to filter stats to what happened in a specific time period within a quarter, or to filter to the last few minutes of activity.

Match stat endpoint time parameters

fromPeriodSeconds and toPeriodSeconds can be used to analyse performance within a specific time period in a match, especially when used with a period filter so you can examine performance in the first 5 minutes of every priod.

If used on a live match (and without a period filter), lastXSeconds gets you the stats from say the last 5 or 10 minutes of play. Best used in concert with a metric filter to keep the endpoint response small and manageable.

These new parameters will be implemented on both GET and POST endpoints (illustrated here on GET) and on both squad and player stats endpoints. They will also be available via the R & Python API Support Packages.

info

Everything presented here is subject to change prior to release - we may add, remove or rename these parameters before we release.