# kaven-aria2

> js wrapper for aria2.

Latest version **1.0.1** (published 2020-01-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install kaven-aria2
pnpm add kaven-aria2
yarn add kaven-aria2
bun add kaven-aria2
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-01-22 |
| First published | 2020-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 341 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kaven |
| Maintainers | kaven-npm |
| Keywords | kaven, aria2, js, node, browser |

## Links

- npm: https://www.npmjs.com/package/kaven-aria2
- npm.io page: https://npm.io/package/kaven-aria2

## Dependencies (1)

- [kaven-basic](https://npm.io/package/kaven-basic.md) ^2.0.3

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-01-22
- 1.0.0 — 2020-01-22

## README

# Kaven-Aria2

js wrapper for aria2.

## Usage

```js
import {
    SocketExecutor, Aria2, Aria2Builder, Aria2Methods, Aria2Notifications
} from "kaven-aria2";

// comment out the following line if used in browser
import WebSocket from "ws"; // https://github.com/websockets/ws

const aria2rpc = "ws://localhost:6800/jsonrpc";
const executor = new SocketExecutor(aria2rpc, WebSocket);

const aria2 = new Aria2(executor);

// addUri
await aria2.addUri(url, { dir: "path/to/save" });

// multicall
await aria2.multicall(new Aria2Builder(Aria2Methods.getGlobalStat), ...gids.map(p => new Aria2Builder(Aria2Methods.tellStatus).SetParams(p)));

// Notifications
executor.Notification.on((data, _) => {
    if (data.method === Aria2Notifications.onDownloadStart) {
        // ...
    }
});
```

---
_Source: https://npm.io/package/kaven-aria2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
