searchIds method
Future<List<SearchResult> >
searchIds(
- SearchIdType idType,
- String id, {
- List<
SearchType> ? searchTypes, - bool extendedFull = false,
- RequestPagination? pagination,
Lookup items by their Trakt, IMDB, TMDB, or TVDB ID.
If you use the search url without a type it might return multiple items if the id_type is not globally unique. Specify the type of results by sending a single value or a comma delimited string for multiple types.
idType
- Type of ID to lookup.
id
- ID that matches with the type
searchTypes
- Search type. Possible values: movie, show, episode, person, list
📄 Pagination ✨ Extended Info
Implementation
Future<List<SearchResult>> searchIds(
SearchIdType idType,
String id, {
List<SearchType>? searchTypes,
bool extendedFull = false,
RequestPagination? pagination,
}) async {
Map<String, String>? params;
if (searchTypes?.isNotEmpty ?? false) {
params = {"type": searchTypes!.map((type) => type.value).join(",")};
}
return await _manager._getList<SearchResult>("search/${idType.value}/$id",
extendedFull: extendedFull,
pagination: pagination,
queryParamameters: params);
}