Latest 1.0.0
Homepage https://github.com/ShinCurry/Aria2RPC
License MIT
Platforms osx 10.10
Dependencies Starscream, SwiftyJSON
Frameworks Foundation

aria2 rpc client for Swift.

Environment

  • Swift 3+
  • OS X 10.10+

Installation

CocoaPods

Check out Get Started tab on cocoapods.org.

To use Aria2RPC in your project add the following ‘Podfile’ to your project

source 'https://github.com/CocoaPods/Specs.git'
platform :osx, '10.10'
use_frameworks!

pod 'Aria2RPC', '~> 1.0.0'

Then run:

pod install

Method list

open func connect()
open var onConnect: (() -> Void)?
open func disconnect()
open var onDisconnect: (() -> Void)?
open var status: Aria2RPC.ConnectionStatus { get set }
open var onStatusChanged: ((Void) -> Void)?
open func shutdown(force: Bool)
open func add(uri: String, withOptions options: [String : String]? = default)
open func add(uris: [String], withOptions options: [String : String]? = default)
open var onAddUris: ((_ flag: Bool) -> Void)?
open func getUris(_ gid: String)
open var onGetUris: ((_ results: [String]) -> Void)?
open func add(torrent: Data, withOptions options: [String : String]? = default)
open var onAddTorrent: ((_ flag: Bool) -> Void)?
open func tellActive()
open var onActives: ((_ results: [Aria2Task]?) -> Void)?
open func tellWaiting()
open var onWaitings: ((_ results: [Aria2Task]?) -> Void)?
open func tellStopped()
open var onStoppeds: ((_ results: [Aria2Task]?) -> Void)?
open func getGlobalStatus()
open var onGlobalStatus: ((_ result: Aria2GlobalStatus) -> Void)?
open func removeActive(_ gid: String)
open var onRemoveActive: ((_ flag: Bool) -> Void)?
open func removeOther(_ gid: String)
open var onRemoveOther: ((_ flag: Bool) -> Void)?
open func clearCompletedErrorRemoved()
open var onClearCompletedErrorRemoved: ((_ flag: Bool) -> Void)?
open func pause(_ gid: String)
open var onPause: ((_ flag: Bool) -> Void)?
open func pauseAll()
open var onPauseAll: ((_ flag: Bool) -> Void)?
open func unpause(_ gid: String)
open var onUnpause: ((_ flag: Bool) -> Void)?
open func unpauseAll()
open var onUnpauseAll: ((_ flag: Bool) -> Void)?
open func restart(_ task: Aria2Task) -> <<error type>>
open var onRemoveOtherToRestart: ((_ flag: Bool) -> Void)?
open var onRestart: ((_ flag: Bool) -> Void)?
open var downloadCompleted: ((_ name: String, _ folderPath: String) -> Void)?
open var downloadPaused: ((_ name: String) -> Void)?
open var downloadStarted: ((_ name: String) -> Void)?
open var downloadStopped: ((_ name: String) -> Void)?
open var downloadError: ((_ name: String) -> Void)?
open func globalSpeedLimit(download: Int, upload: Int)
open var onGlobalSpeedLimitOK: ((_ flag: Bool) -> Void)?
open func lowSpeedLimit(download: Int, upload: Int)
open var onLowSpeedLimitOK: ((_ flag: Bool) -> Void)?
open func change(globalOption options: [String : String])
open var onChangeGlobalOption: ((_ flag: Bool) -> Void)?

Latest podspec

{
    "name": "Aria2RPC",
    "version": "1.0.0",
    "summary": "aria2 rpc client for Swift.",
    "homepage": "https://github.com/ShinCurry/Aria2RPC",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "ShinCurry",
    "platforms": {
        "osx": "10.10"
    },
    "source": {
        "git": "https://github.com/ShinCurry/Aria2RPC.git",
        "tag": "1.0.0"
    },
    "source_files": [
        "Classes",
        "Aria2RPC/*.{swift}"
    ],
    "frameworks": "Foundation",
    "dependencies": {
        "Starscream": [
            "~> 2.0.0"
        ],
        "SwiftyJSON": [
            "~> 3.1.1"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This