Class: MyBitcasa::Delete
- Inherits:
-
Object
- Object
- MyBitcasa::Delete
- Includes:
- ConnectionPool
- Defined in:
- lib/my_bitcasa/delete.rb
Instance Attribute Summary
Attributes included from ConnectionPool
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(*paths) ⇒ Delete
constructor
A new instance of Delete.
Methods included from ConnectionPool
Constructor Details
#initialize(*paths) ⇒ Delete
Returns a new instance of Delete.
8 9 10 |
# File 'lib/my_bitcasa/delete.rb', line 8 def initialize(*paths) @paths = paths.flatten end |
Instance Method Details
#delete ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/my_bitcasa/delete.rb', line 12 def delete res = connection.post do |req| req.url "/delete" req.body = { selection: JSON.generate({ paths: @paths, albums: {}, artists: [], photo_albums: [], }), } end end |