Class: Putio::Transfer
- Inherits:
-
Api::Object
- Object
- Api::Object
- Putio::Transfer
- Defined in:
- lib/putio-ruby/transfer.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Api::Object
Methods included from Api::Client
Class Method Details
.add(url) ⇒ Object
40 41 42 |
# File 'lib/putio-ruby/transfer.rb', line 40 def self.add(url) self.new client.post("transfers/add", :url => url).body end |
.list ⇒ Object
31 32 33 34 |
# File 'lib/putio-ruby/transfer.rb', line 31 def self.list res = client.get("transfers/list") res.body.map { |t| self.new t } end |
.transfer(id) ⇒ Object
36 37 38 |
# File 'lib/putio-ruby/transfer.rb', line 36 def self.transfer(id) self.new client.get("transfers/#{id}").body end |
Instance Method Details
#fetch ⇒ Object
44 45 46 |
# File 'lib/putio-ruby/transfer.rb', line 44 def fetch self.class.transfer(id) end |