1.0.4 • Published 6 years ago

su-downloader2 v1.0.4

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

sudPath

public util method to get .sud file

Kind: global constant

ParamType
filepathstring

initiateDownload(options, number)

Initiates a download, creating a new .sud file which has relevant metadata appended. Does not return anything.

Kind: global function

ParamTypeDefaultDescription
optionsobject
options.urlstringurl to download
options.pathstringfile save path (relative)
number4options.concurrent - number of concurrent downloads

createRequest(params)

creates request object and events

Kind: global function

ParamTypeDescription
paramsobjectrequest params object

Request(params)

returns response and data streams

Kind: global function

ParamTypeDescription
paramsobjectrequest params object

startDownload(sudFile)

starts/resumes downloading from the specified .sud file returns an observable that emits the progress of the download

Kind: global function

ParamTypeDescription
sudFilestringexisting .sud file created with initiateDownload

startDownload~readMeta$

create file

Kind: inner constant of startDownload

suDownloader()

suDownloader

Kind: global function

setSettings(settings)

Kind: global function

ParamTypeDescription
settingsobjectset downloader settings (maxConcurrentDownloads, autoQueue)

QueueDownload(downloadOptions)

Kind: global function

ParamTypeDescription
downloadOptionsobjectadds a download to queue, will automatically start download when queue is free if autoQueue is on

startDownload(key)

Kind: global function

ParamTypeDescription
keystringstarts a download

startDownload~readMeta$

create file

Kind: inner constant of startDownload

startQueue()

starts the queue

Kind: global function

stopQueue()

stops the queue

Kind: global function

pauseDownload(key)

Kind: global function

ParamTypeDescription
keystringpauses a download

resumeDownload(key)

Kind: global function

ParamTypeDescription
keystringresumes a paused download

clearDownload(key, deleteFile)

Kind: global function

ParamTypeDefaultDescription
keyobject
deleteFilebooleanfalsewhether to delete the file or just clear from queue/active
1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago