searchMusic static method
Implementation
static Future<List<Song>> searchMusic(
{int page = 1,
int? genreType,
int? mood,
String? search,
List<String>? version}) async {
String url =
"https://ncs.io/music-search?page=$page${(genreType != null) ? '&genre=$genreType' : ''}${(mood != null) ? '&mood=$mood' : ''}${(version != null) ? '&version=${version.join('-')}' : ''}${(search != null) ? '&q=$search' : ''}";
var document = await Chaleno().load(url);
Result? table = document?.querySelector('.tablesorter');
List<Song> songs = JustParser.parseTable(table: table);
return songs;
}