transmission-rpc-ruby 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f40dbe21491bbcdd4f6aa056748678819a81347f
4
- data.tar.gz: af1ac8e0854ab433daa58c1b56a8b6966cbfa9e2
3
+ metadata.gz: efdf44a2260c3452e6cb831d4500909d58de5065
4
+ data.tar.gz: d13509c0535e64e4de343e417d393dcf31b4e799
5
5
  SHA512:
6
- metadata.gz: d9e982241cd3efef6e490d678bf1404ae8d0e21d6bdd33fe3480d451599dee377ece0c889b2eb95194ce83d1be49e4290f747560346247f0b96a29a04b404a44
7
- data.tar.gz: 7c458a66cf283b4b006d1bbd82d8cba6efe820b370917561866773ad3bbfb8048092419a8eac9a666395d7f49a9c18fc994b9c46c885cd3ed0687cc2502900de
6
+ metadata.gz: 31ba84133758e97c74d5e25ab7c08ac0b1457ab7fe3e0272c7f440dba1eeab2ea91d6409649a904d9f8dcf60bbdcec665c6700ade82609c8b62577707aa79f00
7
+ data.tar.gz: d5482d480e85a4b47fd87486a8c8ac8bfb3e8a2c02a443f24bb4e6e20cba13d30c26e5fcb5d1e80980f92834c55c40489cef80f143dbef0f8fbb59c06d8cbd6c
data/README.md CHANGED
@@ -34,7 +34,7 @@ Introducing the `Transmission::RPC` class, which represent all the raw rpc conne
34
34
 
35
35
  torrents = Transmission::Model::Torrent.all connector: rpc
36
36
 
37
- This Object can be passed to the `Transmission::Model` classes. Examples are shown below.
37
+ This Object can be passed to any of the `Transmission::Model` classes. Examples are shown below.
38
38
 
39
39
  ### Configuration options
40
40
 
@@ -73,10 +73,22 @@ If only a few fields are required
73
73
  #### Add a torrent
74
74
 
75
75
  filename = 'http://example.com/torrent.torrent'
76
- torrent = Transmission::Model::Torrent.add filename: filename
76
+ torrent = Transmission::Model::Torrent.add arguments: {filename: filename}
77
77
 
78
78
  __NOTE:__ you can also specify a magnet link instead
79
79
 
80
+ You can also ask for certain fields too
81
+
82
+ filename = 'http://example.com/torrent.torrent'
83
+ torrent = Transmission::Model::Torrent.add arguments: {filename: filename}, fields: ['id']
84
+
85
+ Or use an RPC connector instance
86
+
87
+ rpc = Transmission::RPC.new host: 'some.host', port: 9091, ssl: false, credentials: {username: 'transmission', password: '********'}
88
+
89
+ filename = 'http://example.com/torrent.torrent'
90
+ torrent = Transmission::Model::Torrent.add arguments: {filename: filename}, fields: ['id'], connector: rpc
91
+
80
92
  #### Torrent instance methods
81
93
 
82
94
  id = 1
@@ -162,7 +174,7 @@ If it is not desired to use any of the `Transmission::Model` classes you can use
162
174
  ids = [1, 2, 3]
163
175
 
164
176
  torrent_bodies = rpc.get_torrent ids
165
- rpc.start_torrents ids
177
+ rpc.start_torrent ids
166
178
 
167
179
  For more methods check out `lib/transmission/rpc.rb`
168
180
 
@@ -100,7 +100,7 @@ module Transmission
100
100
  rpc = options[:connector] || connector
101
101
  body = rpc.add_torrent options[:arguments]
102
102
  raise DuplicateTorrentError if body['torrent-duplicate']
103
- find body['torrent-added']['id']
103
+ find body['torrent-added']['id'], options
104
104
  end
105
105
 
106
106
  def connector
data/lib/transmission.rb CHANGED
@@ -6,5 +6,5 @@ require File.join(File.dirname(__FILE__), 'transmission', 'arguments')
6
6
  require File.join(File.dirname(__FILE__), 'transmission', 'utils')
7
7
 
8
8
  module Transmission
9
- VERSION = '0.2.0'
9
+ VERSION = '0.2.1'
10
10
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'transmission-rpc-ruby'
3
- s.version = '0.2.0'
3
+ s.version = '0.2.1'
4
4
  s.date = '2015-03-27'
5
5
  s.summary = "Transmission RPC wrapper in Ruby"
6
6
  s.description = "A new transmission RPC wrapper for Ruby. All object oriented for controlling remote transmission daemons."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transmission-rpc-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Hoffmann