Class GameStatsController

java.lang.Object
edu.ucsb.cs156.happiercows.controllers.GameStatsController

@RequestMapping("/api/gamestats") @RestController public class GameStatsController extends Object
  • Constructor Details

    • GameStatsController

      public GameStatsController()
  • Method Details

    • allGameStats

      @PreAuthorize("hasRole('ROLE_ADMIN')") @GetMapping("") public Iterable<GameStats> allGameStats()
    • allGameStatsForGame

      @PreAuthorize("hasRole('ROLE_ADMIN')") @GetMapping("/game") public Iterable<GameStats> allGameStatsForGame(@RequestParam Long gameId)
    • getCSV

      @PreAuthorize("hasRole('ROLE_ADMIN')") @GetMapping("/download") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getCSV(@RequestParam Long gameId) throws IOException
      Throws:
      IOException
    • getAllCSV

      @PreAuthorize("hasRole('ROLE_ADMIN')") @GetMapping("/downloadAll") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getAllCSV() throws IOException
      Throws:
      IOException