mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-08 17:40:28 +00:00
feat: use batch download api for create multitasks (#978)
This commit is contained in:
10 files changed
+207
-37
No files matched your search
@@ -0,0 +1,39 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'options.dart';
|
||||
import 'request.dart';
|
||||
|
||||
part 'create_task_batch.g.dart';
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class CreateTaskBatch {
|
||||
List<CreateTaskBatchItem>? reqs;
|
||||
Options? opt;
|
||||
|
||||
CreateTaskBatch({
|
||||
this.reqs,
|
||||
this.opt,
|
||||
});
|
||||
|
||||
factory CreateTaskBatch.fromJson(
|
||||
Map<String, dynamic> json,
|
||||
) =>
|
||||
_$CreateTaskBatchFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$CreateTaskBatchToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class CreateTaskBatchItem {
|
||||
Request? req;
|
||||
Options? opts;
|
||||
|
||||
CreateTaskBatchItem({
|
||||
this.req,
|
||||
this.opts,
|
||||
});
|
||||
|
||||
factory CreateTaskBatchItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$CreateTaskBatchItemFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$CreateTaskBatchItemToJson(this);
|
||||
}
|
||||
Reference in new issue
Block a user