Exemplo n.º 1
0
 @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);
 }
Exemplo n.º 2
0
 @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);
 }