rootor 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -1
  3. data/lib/client.rb +4 -0
  4. data/lib/rootor.rb +8 -0
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 943d8b87318b6315055848ab62c5c7f4d0824b12
4
- data.tar.gz: a0ebf048bcda3c9702273b784b7fc092fd03740c
3
+ metadata.gz: 57aee2a2fc75e6e60f56c0b230be423638bfd7ac
4
+ data.tar.gz: 8fd467e368e92eb606ab32eeef49db41c56968ca
5
5
  SHA512:
6
- metadata.gz: 2933a686393636e0c2f6efd4ed4d7d2e9aafcd54d3bf06c69242c81137c890d8519ef52b58cf33073d70c09cf9baa7f84b18b3f87838fa21f065e90149bcc974
7
- data.tar.gz: 29091f519ed00c637ae9aa165da46a0f2d274822bd3076aef9f42da5420766ed90bbc31236e958d827e479ca0a718cbcb75c3c7a72cfb033c467d72ce0c9f205
6
+ metadata.gz: 5593f543852bbd6bf7f21df24d881de7f582a40f391ecd208f32e50daa9165d0ddbed59ca1baf300476d468679e9d1952f8914070ee84610534f9aff99ac4f1d
7
+ data.tar.gz: 667a992e97d9756a8ddf7026f27e0d9f1f299fe5961ef81985aa2076d9df8009a6185a24bf1476d1993ba0847d74579bf07f86c8c267bcef77dad45957bc3eba
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Rootor is an `XMLRPC` frontend for ruby.
1
+ Rootor is an `xmlrpc` ruby frontend.
2
2
 
3
3
  ```
4
4
  require 'rootor'
@@ -7,3 +7,7 @@ r = Rootor.new('https://<user>:<password>@<server>:<port>/<xmlrpc>')
7
7
 
8
8
  r.torrents
9
9
  ```
10
+
11
+ links
12
+ ---
13
+ https://github.com/mdevaev/emonoda/wiki/rTorrent-XMLRPC-Reference
data/lib/client.rb CHANGED
@@ -5,6 +5,10 @@ class Client < XMLRPC::Client
5
5
  end
6
6
  end
7
7
 
8
+ def load_start(bytes)
9
+ call('load.raw_start', '', bytes)
10
+ end
11
+
8
12
  private
9
13
 
10
14
  def render_queries(queries)
data/lib/rootor.rb CHANGED
@@ -48,6 +48,14 @@ class Rootor
48
48
  end.compact
49
49
  end
50
50
 
51
+ def load_from_raw(data)
52
+ @client.load_start(XMLRPC::Base64.new(data))
53
+ end
54
+
55
+ def load_from_file(path)
56
+ load_from_raw(File.read(path))
57
+ end
58
+
51
59
  private
52
60
 
53
61
  def serialize(torrents)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rootor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - lightbright