qnap-download_station 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +6 -2
- data/lib/qnap/download_station.rb +1 -1
- data/qnap-download_station.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dcdc245bca1fae8f44283dba4fc26564ce6921e6f0112f7c7fd94bc0a27223ff
|
4
|
+
data.tar.gz: cab67c4ffa8a79d4e51ff6985132a0376f9324fc68ceda22bb6617ab7d606f06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdda47bbbe735953249dfb97a7d817c92988bf099c11425c26ed7ebf1004c1931bf5229f166ae13161bc284a4b088dc6555d081ff8e0b7691d9ef8fde8fd1205
|
7
|
+
data.tar.gz: f718054f516cc19c3886db5537619bfac4b799b46de605602286f28903cf45c028bd84a3d48653173d329e8e27f6402a25b9d71cd84a7363cc1b98d266ee3a2b
|
data/README.md
CHANGED
@@ -14,20 +14,23 @@ Usage
|
|
14
14
|
-------
|
15
15
|
|
16
16
|
```ruby
|
17
|
+
# Download a Linux ISO from the web
|
17
18
|
require 'qnap/download_station'
|
18
19
|
|
19
|
-
|
20
|
+
ubuntu_iso = "http://de.releases.ubuntu.com/16.04/ubuntu-16.04.1-desktop-amd64.iso"
|
20
21
|
|
21
22
|
ds = Qnap::DownloadStation.new '192.168.1.100', 'username', 'password'
|
22
|
-
ds.task_add_url temp: 'Download', move: 'Multimedia/New', url:
|
23
|
+
ds.task_add_url temp: 'Download', move: 'Multimedia/New', url: ubuntu_iso
|
23
24
|
active_downloads = ds.task_query
|
24
25
|
ds.logout
|
25
26
|
```
|
26
27
|
|
27
28
|
```ruby
|
28
29
|
# Alternative syntax to guarantee logout
|
30
|
+
# Start downloading a file over BitTorrent using a Magnet link
|
29
31
|
|
30
32
|
Qnap::DownloadStation.session('192.168.1.100', 'username', 'password') do |ds|
|
33
|
+
magnet_link = "magnet:?xt=urn:btih:c12fe1c06bba254a9dc9f519b335aa7c1367a88a&dn"
|
31
34
|
ds.task_add_url temp: 'Download', move: 'Multimedia/New', url: magnet_link
|
32
35
|
pp ds.task_query
|
33
36
|
# logout is automatically called, even if there was an exception
|
@@ -80,6 +83,7 @@ Available methods
|
|
80
83
|
* task_add_url
|
81
84
|
* task_detail
|
82
85
|
* task_get_file
|
86
|
+
* task_get_torrent_file
|
83
87
|
* task_pause
|
84
88
|
* task_priority
|
85
89
|
* task_query
|
@@ -10,7 +10,7 @@ module Qnap
|
|
10
10
|
API_VERSION = 'V4'
|
11
11
|
API_METHODS = {
|
12
12
|
misc: [:dir, :env, :login, :logout, :socks_5],
|
13
|
-
task: [:status, :query, :detail, :add_url, :add_torrent, :start, :stop, :pause, :remove, :priority, :get_file, :set_file],
|
13
|
+
task: [:status, :query, :detail, :add_url, :add_torrent, :start, :stop, :pause, :remove, :priority, :get_file, :set_file, :get_torrent_file],
|
14
14
|
rss: [:add, :query, :update, :remove, :query_feed, :update_feed, :add_job, :query_job, :update_job, :remove_job],
|
15
15
|
config: [:get, :set],
|
16
16
|
account: [:add, :query, :update, :remove],
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qnap-download_station
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cyclotron3k
|
@@ -41,7 +41,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
41
41
|
version: '0'
|
42
42
|
requirements: []
|
43
43
|
rubyforge_project:
|
44
|
-
rubygems_version: 2.
|
44
|
+
rubygems_version: 2.7.6
|
45
45
|
signing_key:
|
46
46
|
specification_version: 4
|
47
47
|
summary: Interface to the Download Station API
|