Aria2Kit is a Swift library to interact with an Aria2 server.
The Swift Package Manager is a tool for automating the distribution of Swift code
and is integrated into the swift
compiler.
Once you have your Swift package set up, adding Aria2Kit as a dependency is as easy as adding it to the dependencies
value of your Package.swift
.
dependencies: [
.package(url: "https://github.com/baptistecdr/Aria2Kit", exact: "1.0.2")
]
You can also add Aria2Kit through Xcode > File > Add packages... > https://github.com/baptistecdr/Aria2Kit
import Aria2Kit
let aria2 = Aria2(ssl: false, host: "localhost", port: 6800, token: "secret-token")
aria2.call(method: .addUri, params: [["https://proof.ovh.net/files/1Mb.dat"], ["split": "1"]]).responseData { response in
debugPrint(response)
}
import Aria2Kit
let aria2 = Aria2(ssl: false, host: "localhost", port: 6800, token: "secret-token")
let multicallParams = [
Aria2MulticallParams(methodName: .addUri, params: [["https://proof.ovh.net/files/1Mb.dat"], ["split": "1"]]),
Aria2MulticallParams(methodName: .getVersion, params: []),
]
aria2.multicall(params: multicallParams).responseData { response in
debugPrint(response)
}
- Open project in Xcode
- Run
docker compose up -d
before running the tests
Have a bug or a feature request? Please first search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.
Contributions are welcome!