containsSavedShows method

Future<Map<String, bool>> containsSavedShows(
  1. List<String> ids
)

Check if passed albums (ids) are saved by current user. ids - list of id's to check Returns the list of id's mapped with the response whether it has been saved

Implementation

Future<Map<String, bool>> containsSavedShows(List<String> ids) async {
  assert(
      ids.isNotEmpty, 'No show ids were provided for checking saved shows');
  var query = _buildQuery({'ids': ids.join(',')});
  var jsonString = await _api._get('$_path/shows/contains?$query');
  var response = List.castFrom<dynamic, bool>(jsonDecode(jsonString));

  return Map.fromIterables(ids, response);
}