removeHiddenItems method
Unhide items for a specific section. Here's what type of items can unhidden for each section.
section
- Possible values: calendar , progress_watched , progress_watched_reset , progress_collected , recommendations .
movies
- Movies to hide
shows
- Shows to hide
seasons
- Seasons to hide
🔒 OAuth Required
Implementation
Future<HiddenItem> removeHiddenItems(
{required HiddenItemSection section,
List<Movie> movies = const [],
List<Show> shows = const [],
List<Season> seasons = const []}) async {
Map<String, dynamic> body = {};
final metaMovies = movies.map((movie) => movie.metadata).toList();
final metaShows = shows.map((show) => show.metadata).toList();
final metaSeasons = seasons.map((season) => season.metadata).toList();
if (metaMovies.isNotEmpty) {
body["movies"] = metaMovies;
}
if (metaShows.isNotEmpty) {
body["shows"] = metaShows;
}
if (metaSeasons.isNotEmpty) {
body["seasons"] = metaSeasons;
}
return await _manager._authenticatedPost<HiddenItem>("users/hidden/${section.value}/remove",
body: jsonEncode(body));
}