baptistecdr/Aria2Kit
Aria2Kit is a Swift library to interact with an Aria2 server
Installation
Swift Package Manager
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.4")
]You can also add Aria2Kit through Xcode > File > Add packages... > https://github.com/baptistecdr/Aria2Kit
Examples
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)
}Build & Test
- Open project in Xcode
- Run
docker compose up -dbefore running the tests
Bugs and feature requests
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.
Contributing
Contributions are welcome!
Package Metadata
Repository: baptistecdr/Aria2Kit
Stars: 6
Forks: 0
Open issues: 1
Default branch: main
Primary language: swift
License: MIT
Topics: aria2, aria2c, swift
README: README.md