class Dropbox::API::Dir

Public Instance Methods

direct_url(options = {}) click to toggle source
# File lib/dropbox-api/objects/dir.rb, line 17
def direct_url(options = {})
  response = client.raw.shares({ :path => self.path, :short_url => false }.merge(options))
  Dropbox::API::Object.init(response, client)
end
hash() click to toggle source
# File lib/dropbox-api/objects/dir.rb, line 22
def hash
  self[:hash]
end
ls(path_to_list = '') click to toggle source
# File lib/dropbox-api/objects/dir.rb, line 8
def ls(path_to_list = '')
  data = client.raw.metadata :path => path + path_to_list
  if data['is_dir']
    Dropbox::API::Object.convert(data.delete('contents') || [], client)
  else
    [Dropbox::API::Object.convert(data, client)]
  end
end