DownloadQuery constructor
DownloadQuery({
- List<
String> ? query, - String? startedBefore,
- String? startedAfter,
- String? endedBefore,
- String? endedAfter,
- double? totalBytesGreater,
- double? totalBytesLess,
- String? filenameRegex,
- String? urlRegex,
- String? finalUrlRegex,
- int? limit,
- List<
String> ? orderBy, - int? id,
- String? url,
- String? finalUrl,
- String? filename,
- DangerType? danger,
- String? mime,
- String? startTime,
- String? endTime,
- State? state,
- bool? paused,
- InterruptReason? error,
- double? bytesReceived,
- double? totalBytes,
- double? fileSize,
- bool? exists,
Implementation
DownloadQuery({
/// This array of search terms limits results to [DownloadItem] whose
/// `filename` or `url` or `finalUrl`
/// contain all of the search terms that do not begin with a dash '-' and
/// none of the search terms that do begin with a dash.
List<String>? query,
/// Limits results to [DownloadItem] that
/// started before the given ms since the epoch.
String? startedBefore,
/// Limits results to [DownloadItem] that
/// started after the given ms since the epoch.
String? startedAfter,
/// Limits results to [DownloadItem] that ended before the given ms since
/// the
/// epoch.
String? endedBefore,
/// Limits results to [DownloadItem] that ended after the given ms since the
/// epoch.
String? endedAfter,
/// Limits results to [DownloadItem] whose
/// `totalBytes` is greater than the given integer.
double? totalBytesGreater,
/// Limits results to [DownloadItem] whose
/// `totalBytes` is less than the given integer.
double? totalBytesLess,
/// Limits results to [DownloadItem] whose
/// `filename` matches the given regular expression.
String? filenameRegex,
/// Limits results to [DownloadItem] whose
/// `url` matches the given regular expression.
String? urlRegex,
/// Limits results to [DownloadItem] whose
/// `finalUrl` matches the given regular expression.
String? finalUrlRegex,
/// The maximum number of matching [DownloadItem] returned. Defaults to
/// 1000. Set to 0 in order to return all matching [DownloadItem]. See
/// [search] for how to page through results.
int? limit,
/// Set elements of this array to [DownloadItem] properties in order to
/// sort search results. For example, setting
/// `orderBy=['startTime']` sorts the [DownloadItem] by their
/// start time in ascending order. To specify descending order, prefix with
/// a
/// hyphen: '-startTime'.
List<String>? orderBy,
/// The `id` of the [DownloadItem] to query.
int? id,
/// The absolute URL that this download initiated from, before any
/// redirects.
String? url,
/// The absolute URL that this download is being made from, after all
/// redirects.
String? finalUrl,
/// Absolute local path.
String? filename,
/// Indication of whether this download is thought to be safe or known to be
/// suspicious.
DangerType? danger,
/// The file's MIME type.
String? mime,
/// The time when the download began in ISO 8601 format.
String? startTime,
/// The time when the download ended in ISO 8601 format.
String? endTime,
/// Indicates whether the download is progressing, interrupted, or complete.
State? state,
/// True if the download has stopped reading data from the host, but kept
/// the
/// connection open.
bool? paused,
/// Why a download was interrupted.
InterruptReason? error,
/// Number of bytes received so far from the host, without considering file
/// compression.
double? bytesReceived,
/// Number of bytes in the whole file, without considering file compression,
/// or -1 if unknown.
double? totalBytes,
/// Number of bytes in the whole file post-decompression, or -1 if unknown.
double? fileSize,
/// Whether the downloaded file exists;
bool? exists,
}) : _wrapped = $js.DownloadQuery(
query: query?.toJSArray((e) => e),
startedBefore: startedBefore,
startedAfter: startedAfter,
endedBefore: endedBefore,
endedAfter: endedAfter,
totalBytesGreater: totalBytesGreater,
totalBytesLess: totalBytesLess,
filenameRegex: filenameRegex,
urlRegex: urlRegex,
finalUrlRegex: finalUrlRegex,
limit: limit,
orderBy: orderBy?.toJSArray((e) => e),
id: id,
url: url,
finalUrl: finalUrl,
filename: filename,
danger: danger?.toJS,
mime: mime,
startTime: startTime,
endTime: endTime,
state: state?.toJS,
paused: paused,
error: error?.toJS,
bytesReceived: bytesReceived,
totalBytes: totalBytes,
fileSize: fileSize,
exists: exists,
);