Swiftpack.co - baptistecdr/Aria2Kit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by baptistecdr.
baptistecdr/Aria2Kit 1.0.1
Aria2Kit is a Swift library to interact with an Aria2 server
⭐️ 0
🕓 16 hours ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/baptistecdr/Aria2Kit.git", from: "1.0.1")

Aria2Kit

Report bug · Request feature

Description

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.0")
]

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 -d before 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!

GitHub

link
Stars: 0
Last commit: 17 hours ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

1.0.1
17 hours ago

What's Changed

New Contributors

Full Changelog: https://github.com/baptistecdr/Aria2Kit/compare/1.0.0...1.0.1

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics