Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 |