Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snuffy/capacitor-native-downloader
capacitor-native-downloader
https://github.com/snuffy/capacitor-native-downloader
Last synced: 2 days ago
JSON representation
capacitor-native-downloader
- Host: GitHub
- URL: https://github.com/snuffy/capacitor-native-downloader
- Owner: snuffy
- Created: 2021-03-02T12:03:25.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-16T12:38:57.000Z (about 1 year ago)
- Last Synced: 2024-12-13T20:08:40.841Z (about 1 month ago)
- Language: Kotlin
- Size: 140 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# capacitor-native-downloader
native file downloader
## Install
```bash
npm install capacitor-native-downloader
npx cap sync
```## API
* [`echo(...)`](#echo)
* [`add(...)`](#add)
* [`start(...)`](#start)
* [`pause(...)`](#pause)
* [`resume(...)`](#resume)
* [`cancel(...)`](#cancel)
* [Interfaces](#interfaces)### echo(...)
```typescript
echo(options: { value: string; }) => Promise<{ value: string; }>
```| Param | Type |
| ------------- | ------------------------------- |
| **`options`** |{ value: string; }
|**Returns:**
Promise<{ value: string; }>
--------------------
### add(...)
```typescript
add(options: { params: IAddDownloadRequest; }) => Promise
```| Param | Type |
| ------------- | -------------------------------------------------------------------------------- |
| **`options`** |{ params: IAddDownloadRequest; }
|**Returns:**
Promise<IAddDownloadResponse>
--------------------
### start(...)
```typescript
start(options: { params: IStartDownloadRequest; }) => Promise
```| Param | Type |
| ------------- | ------------------------------------------------------------------------------------ |
| **`options`** |{ params: IStartDownloadRequest; }
|**Returns:**
Promise<IStartDownloadResponse>
--------------------
### pause(...)
```typescript
pause(options: { params: IPauseDownloadRequest; }) => Promise
```| Param | Type |
| ------------- | ------------------------------------------------------------------------------------ |
| **`options`** |{ params: IPauseDownloadRequest; }
|**Returns:**
Promise<IPauseDownloadResponse>
--------------------
### resume(...)
```typescript
resume(options: { params: IResumeDownloadRequest; }) => Promise
```| Param | Type |
| ------------- | -------------------------------------------------------------------------------------- |
| **`options`** |{ params: IResumeDownloadRequest; }
|**Returns:**
Promise<IResumeDownloadResponse>
--------------------
### cancel(...)
```typescript
cancel(options: { params: ICancelDownloadRequest; }) => Promise
```| 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
|