Class: Fog::Storage::Dropbox::Directories

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/dropbox/models/storage/directories.rb

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
13
# File 'lib/fog/dropbox/models/storage/directories.rb', line 10

def all
  data = service.client.('/')
  load(data['contents'])
end

#get(key, options = {}) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/fog/dropbox/models/storage/directories.rb', line 15

def get(key, options = {})
  data = service.client.(key)
  directory = new(data)
  directory.files.load(data['contents'])
  directory
rescue DropboxError
  nil
end