DEPRECIATION WARNING: This gem is being depreciated for: github.com/RISCfuture/dropbox
NOTE: Dropbox has announced their official API. See more here: blog.dropbox.com/?p=492
A simple stop-gap Ruby API for DropBox.
-
Don’t have a dropbox account? Well you should! You can “donate” to this project by signing up with this referral url: www.dropbox.com/referrals/NTI0MDI3MzU5
-
sudo gem install dropbox
d = DropBox.new("[email protected]","password!") #login d.list("/") # show directory contents d.create_directory("/testdirectory") # create a remove directory d.create("/local/path/to/file.txt","/testdirectory") # upload a file to the directory d.rename("/testdirectory/file.txt","file.txt") # rename the file d.destroy("file.txt") # remove the file d.usage_stats # => {:regular_used=>18.6, :shared_used=>670.2, :free=>1359.2, :used=>688.8, :percent=>34%, :total=>2048.0} d2 = DropBox.new("[email protected]","password!", "optional_namespace") # all actions will happen in /optional_namespace