searchPlaylists method

Future<List<PlaylistDetailed>> searchPlaylists(
  1. String query
)

Performs a search specifically for playlists with the given query and returns a list of playlist details.

Implementation

Future<List<PlaylistDetailed>> searchPlaylists(String query) async {
  final searchData = await constructRequest(
    "search",
    body: {
      "query": query,
      "params": "Eg-KAQwIABAAGAAgACgBMABqChAEEAMQCRAFEAo%3D"
    },
  );

  return traverseList(searchData, ["musicResponsiveListItemRenderer"])
      .map(PlaylistParser.parseSearchResult)
      .toList();
}