@RequestMapping( value = "/history/count", method = RequestMethod.GET, produces = "application/json") public void getHistoryCount( final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse) { final int count = _historicalStorage.getHistoryCount(null); }
@RequestMapping(value = "/history", method = RequestMethod.GET) public void getHistory( final HttpServletResponse httpServletResponse, @RequestParam(value = "index", defaultValue = "0") int index, @RequestParam(value = "count", defaultValue = "${jahspotify.history.default-count}") int count) { final Collection<TrackHistory> history = _historicalStorage.getHistory(index, count, null); httpServletResponse.setContentType("application/json"); serializeHistoryCursor(history, httpServletResponse); }