Package org.localify.music.genre
Class GenreController
java.lang.Object
org.localify.music.genre.GenreController
@RestController
@RequestMapping("/v1/genres")
@ConditionalOnWebApplication
public class GenreController
extends Object
Controller for handling genre-related requests.
-
Constructor Summary
ConstructorsConstructorDescriptionGenreController(GenreService genreService) Constructs a new GenreController. -
Method Summary
Modifier and TypeMethodDescriptionGets a list of curated genres.Gets the top genres with their top artists.
-
Constructor Details
-
GenreController
Constructs a new GenreController.- Parameters:
genreService- The genre service.
-
-
Method Details
-
getTopGenres
@GetMapping(value="/top", produces="application/json") @ResponseBody public List<TopGenreResponseWithTopArtists> getTopGenres()Gets the top genres with their top artists.- Returns:
- A list of top genres with top artists.
-
getCurated
@GetMapping(value="/curated", produces="application/json") @ResponseBody public List<TopGenreResponse> getCurated()Gets a list of curated genres.- Returns:
- A list of curated genres.
-