mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-08 01:30:28 +08:00
Add import task
This commit is contained in:
@@ -308,12 +308,24 @@ abstract class _EHApi {
|
||||
{@Part(name: 'cfg') ExportZipConfig? cfg,
|
||||
@Part(name: "type") String t = "export_zip",
|
||||
@CancelRequest() CancelToken? cancel});
|
||||
@PUT('/task')
|
||||
@MultiPart()
|
||||
Future<ApiResult<Task>> createImportTask(
|
||||
@Part(name: "gid") int gid,
|
||||
@Part(name: "token") String token, {
|
||||
@Part(name: "cfg") ImportConfig? cfg,
|
||||
@Part(name: "type") String t = "import",
|
||||
@CancelRequest() CancelToken? cancel,
|
||||
});
|
||||
@GET('/task/download_cfg')
|
||||
Future<ApiResult<DownloadConfig>> getDefaultDownloadConfig(
|
||||
{@CancelRequest() CancelToken? cancel});
|
||||
@GET('/task/export_zip_cfg')
|
||||
Future<ApiResult<ExportZipConfig>> getDefaultExportZipConfig(
|
||||
{@CancelRequest() CancelToken? cancel});
|
||||
@GET('/task/import_cfg')
|
||||
Future<ApiResult<DefaultImportConfig>> getDefaultImportConfig(
|
||||
{@CancelRequest() CancelToken? cancel});
|
||||
}
|
||||
|
||||
class EHApi extends __EHApi {
|
||||
|
||||
Reference in New Issue
Block a user