Created
August 21, 2013 18:53
-
-
Save davidklaw/6298629 to your computer and use it in GitHub Desktop.
Ruby script for clearing out CloudApp uploads.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gem install cloudapp_api | |
require 'cloudapp_api' | |
def delete(drops) | |
drops = CloudApp::Drop.all | |
drops.each do |drop| | |
puts "Deleting #{drop.url}" | |
drop.delete | |
end | |
@drops = CloudApp::Drop.all | |
if @drops.length > 0 | |
delete(@drops) | |
end | |
end | |
CloudApp.authenticate "USERNAME", "PASSWORD" | |
@drops = CloudApp::Drop.all | |
delete(@drops) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment