getHistory method

Future<SonarrHistory> getHistory({
  1. required SonarrHistorySortKey sortKey,
  2. int? page,
  3. int? pageSize,
  4. SonarrSortDirection? sortDirection,
  5. int? episodeId,
})

Handler for history.

Gets history (grabs/failures/completed).

Required Parameters:

Optional Parameters:

  • page: The page of history to fetch (Default: 1)
  • pageSize: The amount of items per page to fetch
  • sortDirection: SonarrSortDirection object containing the sorting direction
  • episodeId: The episode ID to filter results for

Implementation

Future<SonarrHistory> getHistory({
    required SonarrHistorySortKey sortKey,
    int? page,
    int? pageSize,
    SonarrSortDirection? sortDirection,
    int? episodeId,
}) async => _commandGetHistory(
    _client,
    sortKey: sortKey,
    page: page,
    pageSize: pageSize,
    sortDirection: sortDirection,
    episodeId: episodeId,
);