Module: LayerVault::Client::Folders

Included in:
LayerVault::Client
Defined in:
lib/layervault/client/folders.rb

Instance Method Summary collapse

Instance Method Details

#change_folder_color(organization_name, project_name, path, options = {}) ⇒ Object

Raises:



21
22
23
24
# File 'lib/layervault/client/folders.rb', line 21

def change_folder_color(organization_name, project_name, path, options={})
  raise ClientParamsError.new("You must specify the color option for the new color to apply to the folder.") unless options.fetch(:color, nil)
  put "#{organization_name}/#{project_name}/#{path}", options
end

#create_folder(organization_name, project_name, path) ⇒ Object



12
13
14
# File 'lib/layervault/client/folders.rb', line 12

def create_folder(organization_name, project_name, path)
  post "#{organization_name}/#{project_name}/#{path}"
end

#delete_folder(organization_name, project_name, path) ⇒ Object



8
9
10
# File 'lib/layervault/client/folders.rb', line 8

def delete_folder(organization_name, project_name, path)
  delete "#{organization_name}/#{project_name}/#{path}"
end

#folder(organization_name, project_name, path) ⇒ Object



4
5
6
# File 'lib/layervault/client/folders.rb', line 4

def folder(organization_name, project_name, path)
  get "#{organization_name}/#{project_name}/#{path}"
end

#move_folder(organization_name, project_name, path, options = {}) ⇒ Object

Raises:



16
17
18
19
# File 'lib/layervault/client/folders.rb', line 16

def move_folder(organization_name, project_name, path, options={})
  raise ClientParamsError.new("You must specify the :to option for the destination folder.") unless options.fetch(:to, nil)
  post "#{organization_name}/#{project_name}/#{path}/move", options
end