Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

CloudApp API wrapper for Ruby, using HTTParty with an ActiveResource-like interface

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .document
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 cloudapp_api.gemspec

CloudApp API

Build Status Code Climate Coverage Status

A simple Ruby wrapper for the CloudApp API. Uses HTTParty with a simple ActiveResource-like interface.

Two interfaces are provided for interacting with the CloudApp API. The first is a ActiveResource-like interface, directly calling methods on the Drop and Account classes. The second option is to interact through a Client interface.


To install as a Gem:

sudo gem install cloudapp_api


Authentication is necessary for most actions, the only exceptions being when creating a new Account or querying a specific Drop.

CloudApp.authenticate "", "password"


  • Documentation - {CloudApp::Drop}

Usage via the Drop class

# Find a single drop by it's slug
@drop = CloudApp::Drop.find "2wr4"

# Get a list of all drops
@drops = CloudApp::Drop.all

# Create a new bookmark
@drop = CloudApp::Drop.create :bookmark, :name => "CloudApp", :redirect_url => ""

# Create multiple bookmarks
bookmarks = [
  { :name => "Authur Dent", :redirect_url => "" },
  { :name => "Zaphod Beeblebrox", :redirect_url => "" }
@drops = CloudApp::Drop.create :bookmarks, bookmarks

# Upload a file
@drop = CloudApp::Drop.create :upload, :file => "/path/to/image.png"
@drop = CloudApp::Drop.create :upload, :file => "/path/to/image.png", :private => true

# Rename a file
CloudApp::Drop.update "", :name => "Big Screenshot"

# Set a drop's privacy
CloudApp::Drop.update "", :private => true

# Delete a drop
CloudApp::Drop.delete ""

# Recover a deleted drop
CloudApp::Drop.recover ""

Usage via the class instance

# Rename a file
@drop.update :name => "Big Screenshot"

# Set the drop's privacy
@drop.update :private => true

# Delete a drop

# Recover a deleted drop

Drops via a Client instance

  • Documentation - {CloudApp::Client}

# Find a single drop by it's slug
drop = @client.drop "2wr4"

# Get a list of all drops
drops = @client.all

# Create a new bookmark
drop = @client.bookmark "", "CloudApp"

# Create multiple new bookmarks
bookmarks = [
  { :name => "Authur Dent", :redirect_url => "" },
  { :name => "Zaphod Beeblebrox", :redirect_url => "" }
drops = @client.bookmark bookmarks

# Upload a file
drop = @client.upload "/path/to/image.png"
drop = @client.upload "/path/to/image.png", :private => true

# Rename a file
@client.rename "2wr4", "Big Screenshot"

# Set a drop's privacy
@client.privacy "2wr4", true

# Delete an drop
@client.delete "2wr4"

# Recover a deleted drop
@client.recover "2wr4"

Account examples

  • Documentation - {CloudApp::Account}

# Create a CloudApp account
@account = CloudApp::Account.create :email => "", :password => "towel"

# View account details
@account = CloudApp::Account.find

# Forgot password
CloudApp::Account.reset :email => ""

# Change default security
@account.update :private_items => false

# Change email
@account.update :email => "", :current_password => "towel"

# Change password
@account.update :password => "happy frood", :current_password => "towel"

# Set custom domain
@account.update :domain => "", :domain_home_page => ""

# View account stats

Gift cards

  • Documentation - {CloudApp::GiftCard}

# View gift card details
@gift = CloudApp::GiftCard.find "ABC123"

# Apply the gift card
CloudApp::GiftCard.redeem "ABC123"
  # or

What's next on the to-do list?

  • Refactor the Client interface so can be used with all of the API

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Author & Contributors


Copyright (c) 2010 Aaron Russell. See LICENSE for details.

Something went wrong with that request. Please try again.