Method: CloudApp::Drop.all

Defined in:
lib/cloudapp/drop.rb

.all(opts = {}) ⇒ Array[CloudApp::Drop]

Page through your drops.

Requires authentication.

Parameters:

  • opts (Hash) (defaults to: {})

    options parameters

Options Hash (opts):

  • :page (Integer)

    Page number starting at 1

  • :per_page (Integer)

    Number of items per page

  • :type (String)

    Filter items by type (image, bookmark, text, archive, audio, video, or unknown)

  • :deleted (Boolean)

    Show trashed drops

Returns:



77
78
79
80
# File 'lib/cloudapp/drop.rb', line 77

def self.all(opts = {})
  res = get "/items", {:query => (opts.empty? ? nil : opts), :digest_auth => @@auth}
  res.ok? ? res.collect{|i| Drop.new(i)} : bad_response(res)
end