For the segment editor #2135 and for custom alerts #1486 we need an API that returns the suggested values for a given segment.
The API should be simple to use and fast, and return a plain list of unique strings that have been used for the request segment, to assist users in creating segments.
In 35f975a: Fixes #3904:
new API: getSuggestedValuesForSegment which returns top suggested values for a particular segment. It uses the Live.getLastVisitsDetails API to fetch the most recently used values, and will show the most used values first
Adding tests for everything. The test case actually generates data for all segments so that VisitsSummary.get returns some data for each of the 47 segments being tested returns some data.
How it works:
In ea240af: Refs #3906
In 3069828: Refs #3906