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.2
Aria2Kit is a Swift library to interact with an Aria2 server
⭐️ 1
🕓 5 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/baptistecdr/Aria2Kit.git", from: "1.0.2")

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

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: 1
Last commit: 2 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

1.0.2
5 weeks ago

What's Changed

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

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