Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aria2

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aria2

JavaScript client library for aria2.

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
300
increased by1.35%
Maintainers
1
Weekly downloads
 
Created
Source

aria2.js

JavaScript library for aria2, "The next generation download utility."

Build Status Dependency Status devDependency Status

Use

Install

npm install aria2

Browsers

<script src="aria2.js/lib/index.js"></script>

Node.js

var aria2 = require('aria2');

Example

var aria2 = new Aria2();

aria2.open('ws://127.0.0.1:6800/jsonrpc')

aria2.onopen = function() {
  console.log('OPEN');

  //aria2 method
  aria2.getVersion(function(err, res) {
    console.log(err || res);
  });
};
aria2.onclose = function() {
  console.log('close');
};
aria2.onsend = function(m) {
  console.log('message out:')
  console.log(m);
};
aria2.onmessage = function(m) {
  console.log('message in:');
  console.log(m);
};

//aria2 notification
aria2.onDownloadStart = function(e) {
  console.log(e);
};

Methods

See aria2 methods

For every method you can use

aria2.send(method, [params], function(err, res) {
  console.log(err || res);
});

or directly

aria2.method([params], function(err, res) {
  console.log(err || res);
});

Notifications

See aria2 notifications

For every notifications you can attach a function to call.

aria2.onDownloadStart = function(event) {
  console.log(event);
};

FAQs

Package last updated on 16 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc