Skip to content

snuffy/capacitor-native-downloader

Repository files navigation

capacitor-native-downloader

native file downloader

Install

npm install capacitor-native-downloader
npx cap sync

API

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>
Param Type
options { value: string; }

Returns: Promise<{ value: string; }>


add(...)

add(options: { params: IAddDownloadRequest; }) => Promise<IAddDownloadResponse>
Param Type
options { params: IAddDownloadRequest; }

Returns: Promise<IAddDownloadResponse>


start(...)

start(options: { params: IStartDownloadRequest; }) => Promise<IStartDownloadResponse>
Param Type
options { params: IStartDownloadRequest; }

Returns: Promise<IStartDownloadResponse>


pause(...)

pause(options: { params: IPauseDownloadRequest; }) => Promise<IPauseDownloadResponse>
Param Type
options { params: IPauseDownloadRequest; }

Returns: Promise<IPauseDownloadResponse>


resume(...)

resume(options: { params: IResumeDownloadRequest; }) => Promise<IResumeDownloadResponse>
Param Type
options { params: IResumeDownloadRequest; }

Returns: Promise<IResumeDownloadResponse>


cancel(...)

cancel(options: { params: ICancelDownloadRequest; }) => Promise<ICancelDownloadResponse>
Param Type
options { params: ICancelDownloadRequest; }

Returns: Promise<ICancelDownloadResponse>


Interfaces

IAddDownloadResponse

Prop Type
id string
fileName string
absolutePath string

IAddDownloadRequest

Prop Type
id string
url string
size number
filePath string
fileName string
displayName string
headers { authorization: string; }

IStartDownloadResponse

Prop Type
id string
filename string
absolutePath string

IStartDownloadRequest

Prop Type
id string

IPauseDownloadResponse

Prop Type
id string
filename string
absolutePath string

IPauseDownloadRequest

Prop Type
id string

IResumeDownloadResponse

Prop Type
id string
filename string
absolutePath string

IResumeDownloadRequest

Prop Type
id string

ICancelDownloadResponse

Prop Type
id string
filename string
absolutePath string

ICancelDownloadRequest

Prop Type
id string