0.0.1-dev • Published 7 years ago
idaman-engine v0.0.1-dev
idaman-engine
Idaman Engine
API
new Download(url: string, options?: DownloadOptions): Download
Creates a new download.
DownloadOptions
outDir?: stringDefault: current working directory.outFile?: stringDefault: parsed from URL.maxConnection?: numberDefault: 4.overwrite?: booleanDefault:true.sessionPath?: stringDefault:outDir/outFile.idmnuseServerFileName?: booleanDefault:true.
start(): void
Starts download.
abort(): void
Aborts download.
on(event: string, listener: function)
Registers a listener to an event.
on('error', (Error) => {})
Emitted if error occured.
on('change', (DownloadChange) => {})
Emitted if there are changes in download options.
on('finish', () => {})
Emitted if download has been finished.