Dataset Filtering, Sorting & Limiting
Before you dive in to Filtering and limiting you must have a basic understanding of how the API works and what "including data" means. If these terms are unfamiliar for you, we suggest you to start reading Dataset Enrichment first.
Imagine that we want to get the full season schedule of the 2019 Big Bash LEague (BBL). We can request this data via the following URL.
Filtering The Relationships
In some cases it might be useful to filter the includes to remove data you do not need. Let's say we have included
odds and only want the odds of bookmaker
This will remove all the odds that are not from
bet365 from the response so you don't have any overhead.
Sorting The Includes
During the season games are being rescheduled due to, for example, International games being played. This will result in an updated/rescheduled games, but since the game ids haven't changed, it can result in weird responses since we want it to be sorted based on
starting_at attribute. Here include sorting comes in handy:
The above request will result in games sorted by
starting_at attribute in ascending order. If you are interested in sorting the other way around then you simply prefix the sorting field with a -(minus sing)