removeFromWatchlist method
Remove one or more items from a user's watchlist.
🔒 OAuth Required
Implementation
Future<RemoveFromSyncResponse> removeFromWatchlist(
{List<Movie> movies = const [],
List<Show> shows = const [],
List<Season> seasons = const [],
List<Episode> episodes = const []}) async {
Map<String, dynamic> body = {};
if (movies.isNotEmpty) {
body["movies"] = movies.map((movie) => movie.metadata).toList();
}
if (shows.isNotEmpty) {
body["shows"] = shows.map((show) => show.metadata).toList();
}
if (seasons.isNotEmpty) {
body["seasons"] = seasons.map((season) => season.metadata).toList();
}
if (episodes.isNotEmpty) {
body["episodes"] = episodes.map((episode) => episode.metadata).toList();
}
return await _manager._authenticatedPost<RemoveFromSyncResponse>(
"sync/watchlist/remove",
body: jsonEncode(body));
}