https://github.com/sphericalkat/arigo
https://github.com/sphericalkat/arigo
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sphericalkat/arigo
- Owner: SphericalKat
- License: mit
- Created: 2022-09-07T16:40:39.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T11:54:05.000Z (over 2 years ago)
- Last Synced: 2025-07-12T22:39:30.940Z (12 months ago)
- Language: Go
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# arigo
[](https://github.com/SphericalKat/arigo/actions/workflows/build.yml)
[](https://goreportcard.com/report/github.com/SphericalKat/arigo)
[](http://godoc.org/github.com/SphericalKat/arigo)
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:
```bash
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
```go
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)
}
```