Skip to content

SphericalKat/arigo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arigo

Build Status Go Report Card Documentation

A client library for the aria2 RPC interface.

Features:

  • Complete implementation of all supported methods.
  • Bidirectional communication over WebSocket which makes it possible to receive events and know when a download has completed.

arigo currently doesn't start and manage the aria2c process for you. To start aria2 use the following command:

aria2c --enable-rpc --rpc-listen-all

If aria2 is not installed then head on to https://aria2.github.io/ and follow the instructions there.

Example

package main

import (
	"fmt"
	"github.com/SphericalKat/arigo"
)

func main() {
	c, err := arigo.Dial("ws://localhost:6800/jsonrpc", "")
	if err != nil {
		panic(err)
	}
	
	// Download is a utility method which calls AddURI and 
	// then waits for the download to complete
	status, err := c.Download(arigo.URIs("https://example.org/file"), nil)
	if err != nil {
		panic(err)
	}
	
	// download complete
	fmt.Println(status.GID)
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages